Skip to content

Commit

Permalink
Update names
Browse files Browse the repository at this point in the history
  • Loading branch information
googollee committed Aug 23, 2023
1 parent 4e795b4 commit ebf2290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/prometheus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit ebf2290

Please sign in to comment.