From ebf229064ebb2e89d846c5bf573f0ee4c26d61b1 Mon Sep 17 00:00:00 2001 From: Googol Lee Date: Wed, 23 Aug 2023 14:39:27 +0200 Subject: [PATCH] Update names --- examples/prometheus_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/prometheus_test.go b/examples/prometheus_test.go index 588f059..5c3676b 100644 --- a/examples/prometheus_test.go +++ b/examples/prometheus_test.go @@ -14,7 +14,7 @@ var mycounter = prometheus.NewCounter(prometheus.CounterOpts{ Name: "mycounter", }) -func AddCounter(ctx espresso.Context) error { +func HandlerAddCounter(ctx espresso.Context) error { var num int if err := ctx.Endpoint(http.MethodGet, "/inc/:num"). BindPath("num", &num).End(); err != nil { @@ -30,7 +30,7 @@ func AddCounter(ctx espresso.Context) error { func LaunchWithPrometheus() (addr string, cancel func()) { server, _ := espresso.New(prometheus.New("/metrics")) - server.HandleFunc(AddCounter) + server.HandleFunc(HandlerAddCounter) httpSvr := httptest.NewServer(server) addr = httpSvr.URL