chore(ci): update golangci-lint to latest version

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy
2024-05-12 09:24:05 +10:00
parent 99b6d215a2
commit c713bed4e3
3 changed files with 7 additions and 7 deletions

View File

@@ -180,14 +180,14 @@ func main() {
mux := http.NewServeMux()
mux.HandleFunc(*metricsPath, withConcurrencyLimit(*maxRequests, collectors.BuildServeHTTP(*disableExporterMetrics, *timeoutMargin)))
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, err := fmt.Fprintln(w, `{"status":"ok"}`)
if err != nil {
_ = level.Debug(logger).Log("msg", "Failed to write to stream", "err", err)
}
})
mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/version", func(w http.ResponseWriter, _ *http.Request) {
// we can't use "version" directly as it is a package, and not an object that
// can be serialized.
err := json.NewEncoder(w).Encode(prometheusVersion{