Refactor/cleanup of negotiation path

This commit is contained in:
David Zhao
2021-04-15 17:03:22 -07:00
parent 6c5bd4ce42
commit e4238890ff
20 changed files with 153 additions and 151 deletions
+5 -1
View File
@@ -25,5 +25,9 @@ func handleError(w http.ResponseWriter, status int, msg string) {
l := logger.Desugar().WithOptions(zap.AddCallerSkip(1))
l.Debug("error handling request", zap.String("error", msg), zap.Int("status", status))
w.WriteHeader(status)
w.Write([]byte(msg))
_, _ = w.Write([]byte(msg))
}
func boolValue(s string) bool {
return s == "1" || s == "true"
}