mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-09-21 08:04:14 +00:00
Simplify. NFC
This commit is contained in:
+2
-1
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
automemlimit "github.com/KimMachineGun/automemlimit/memlimit"
|
||||
"github.com/c2h5oh/datasize"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
var config *Config
|
||||
@@ -159,7 +160,7 @@ func main() {
|
||||
go serve(pagesListener, http.HandlerFunc(ServePages))
|
||||
go serve(caddyListener, http.HandlerFunc(ServeCaddy))
|
||||
go serve(healthListener, http.HandlerFunc(ServeHealth))
|
||||
go serve(metricsListener, NewMetricsHTTPHandler())
|
||||
go serve(metricsListener, promhttp.Handler())
|
||||
|
||||
if config.Insecure {
|
||||
log.Println("serve: ready (INSECURE)")
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/honeybadger-io/honeybadger-go"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
func hasHoneybadger() bool {
|
||||
@@ -26,7 +25,3 @@ func ObserveHTTPHandler(handler http.Handler) http.Handler {
|
||||
}
|
||||
return handler
|
||||
}
|
||||
|
||||
func NewMetricsHTTPHandler() http.Handler {
|
||||
return promhttp.Handler()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user