Skip to content

Commit 61fc186

Browse files
authored
http/pprof: update readme (#138)
The readme for `http/pprof` doesn't compile currently: `Profile` is a `HandlerFunc`, not a `Handler`.
1 parent 3e89ad9 commit 61fc186

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

http/pprof/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ the `net/http/pprof` package is imported by dependencies, and therefore there is
2121
reliable way to avoid the conflict.
2222

2323
```go
24+
package main
25+
2426
import (
2527
"net/http"
2628

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

3032
func main() {
31-
http.Handle("/debug/pprof/cpu", pprof.Profile())
33+
http.HandleFunc("/debug/pprof/cpu", pprof.Profile)
3234
}
3335
```
3436

0 commit comments

Comments
 (0)