From ee7480bcda014b7a495da7d83d72764cd7e07923 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Tue, 7 Jul 2020 13:41:05 -0700 Subject: [PATCH] Make package constants private Signed-off-by: Andrew Keesler --- pkg/handlers/handlers.go | 4 ++-- pkg/handlers/healthz_handler.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/handlers/handlers.go b/pkg/handlers/handlers.go index fce170b5..e944daf1 100644 --- a/pkg/handlers/handlers.go +++ b/pkg/handlers/handlers.go @@ -7,8 +7,8 @@ package handlers import "net/http" -const JSONMimeType = "application/json; charset=utf-8" -const HeaderNameContentType = "Content-Type" +const jsonMimeType = "application/json; charset=utf-8" +const headerNameContentType = "Content-Type" func New() http.Handler { mux := http.NewServeMux() diff --git a/pkg/handlers/healthz_handler.go b/pkg/handlers/healthz_handler.go index 9e34407e..d96c3b57 100644 --- a/pkg/handlers/healthz_handler.go +++ b/pkg/handlers/healthz_handler.go @@ -19,7 +19,7 @@ type healthzHandler struct{} func (h healthzHandler) ServeHTTP(responseWriter http.ResponseWriter, _ *http.Request) { response := healthzResponse{"OK"} js, _ := json.Marshal(response) - responseWriter.Header().Set(HeaderNameContentType, JSONMimeType) + responseWriter.Header().Set(headerNameContentType, jsonMimeType) _, _ = responseWriter.Write(js) }