Skip to content

Commit c14b6f4

Browse files
committed
example: Log addr on startup
1 parent d6b8e30 commit c14b6f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

example/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ func main() {
2525
// Run http endpoints for both pprof and fgprof.
2626
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
2727
go func() {
28-
log.Println(http.ListenAndServe("localhost:6060", nil))
28+
addr := "localhost:6060"
29+
log.Printf("Listening on %s", addr)
30+
log.Println(http.ListenAndServe(addr, nil))
2931
}()
3032

3133
// Start a sleep server to help with simulating slow network requests.

0 commit comments

Comments
 (0)