diff --git a/api/server/profiler.go b/api/server/profiler.go index 8bf8384fdb..658184b1e6 100644 --- a/api/server/profiler.go +++ b/api/server/profiler.go @@ -29,13 +29,13 @@ func profilerSetup(mainRouter *mux.Router) { func expVars(w http.ResponseWriter, r *http.Request) { first := true w.Header().Set("Content-Type", "application/json; charset=utf-8") - fmt.Fprintf(w, "{\n") + fmt.Fprintln(w, "{") expvar.Do(func(kv expvar.KeyValue) { if !first { - fmt.Fprintf(w, ",\n") + fmt.Fprintln(w, ",") } first = false fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value) }) - fmt.Fprintf(w, "\n}\n") + fmt.Fprintln(w, "\n}") } diff --git a/api/server/server_test.go b/api/server/server_test.go index 11831c148d..272dc81fb6 100644 --- a/api/server/server_test.go +++ b/api/server/server_test.go @@ -29,7 +29,7 @@ func TestMiddlewares(t *testing.T) { localHandler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error { if httputils.VersionFromContext(ctx) == "" { - t.Fatalf("Expected version, got empty string") + t.Fatal("Expected version, got empty string") } if sv := w.Header().Get("Server"); !strings.Contains(sv, "Docker/0.1omega2") {