mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-22 02:38:32 -05:00
Revert "fixed code smells: string literal repetition + cyclomatic complexity"
This reverts commit aa4112e2e2.
This commit is contained in:
@@ -27,12 +27,10 @@ func Server(opts ...Option) (*http.Server, error) {
|
||||
), nil
|
||||
}
|
||||
|
||||
const contentTypeHeader = "Content-Type"
|
||||
|
||||
// health implements the health check.
|
||||
func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set(contentTypeHeader, "text/plain")
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
// TODO(tboerger): check if services are up and running
|
||||
@@ -46,7 +44,7 @@ func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
|
||||
// ready implements the ready check.
|
||||
func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set(contentTypeHeader, "text/plain")
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
// TODO(tboerger): check if services are up and running
|
||||
|
||||
Reference in New Issue
Block a user