Skip to content

Commit

Permalink
http/pprof: update readme (#138)
Browse files Browse the repository at this point in the history
The readme for `http/pprof` doesn't compile currently: `Profile` is a `HandlerFunc`, not a `Handler`.
  • Loading branch information
vrischmann authored Dec 12, 2024
1 parent 3e89ad9 commit 61fc186
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion http/pprof/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ the `net/http/pprof` package is imported by dependencies, and therefore there is
reliable way to avoid the conflict.

```go
package main

import (
"net/http"

"github.com/grafana/pyroscope-go/http/pprof"
)

func main() {
http.Handle("/debug/pprof/cpu", pprof.Profile())
http.HandleFunc("/debug/pprof/cpu", pprof.Profile)
}
```

Expand Down

0 comments on commit 61fc186

Please sign in to comment.