Make package constants private
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
parent
68d01f97a4
commit
ee7480bcda
@ -7,8 +7,8 @@ package handlers
|
|||||||
|
|
||||||
import "net/http"
|
import "net/http"
|
||||||
|
|
||||||
const JSONMimeType = "application/json; charset=utf-8"
|
const jsonMimeType = "application/json; charset=utf-8"
|
||||||
const HeaderNameContentType = "Content-Type"
|
const headerNameContentType = "Content-Type"
|
||||||
|
|
||||||
func New() http.Handler {
|
func New() http.Handler {
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
|
@ -19,7 +19,7 @@ type healthzHandler struct{}
|
|||||||
func (h healthzHandler) ServeHTTP(responseWriter http.ResponseWriter, _ *http.Request) {
|
func (h healthzHandler) ServeHTTP(responseWriter http.ResponseWriter, _ *http.Request) {
|
||||||
response := healthzResponse{"OK"}
|
response := healthzResponse{"OK"}
|
||||||
js, _ := json.Marshal(response)
|
js, _ := json.Marshal(response)
|
||||||
responseWriter.Header().Set(HeaderNameContentType, JSONMimeType)
|
responseWriter.Header().Set(headerNameContentType, jsonMimeType)
|
||||||
_, _ = responseWriter.Write(js)
|
_, _ = responseWriter.Write(js)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user