Skip to content

Commit

Permalink
Address linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
itskingori committed Nov 20, 2024
1 parent 35d67b2 commit 025553e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
linters:
disable-all: true
enable:
- govet
- revive
8 changes: 6 additions & 2 deletions resque_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,19 @@ func main() {
reg.MustRegister(exporter)

http.Handle(*metricPath, promhttp.HandlerFor(reg, promhttp.HandlerOpts{Registry: reg}))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<html>
http.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
_, err := w.Write([]byte(`<html>
<head><title>Resque Exporter</title></head>
<body>
<h1>Resque Exporter</h1>
<p><a href='` + *metricPath + `'>Metrics</a></p>
</body>
</html>
`))

if err != nil {
log.Error(err)
}
})

log.Infoln("Listening on", *listenAddress)
Expand Down

0 comments on commit 025553e

Please sign in to comment.