glider/dev.go

19 lines
232 B
Go
Raw Normal View History

2018-07-21 22:56:37 +08:00
//+build dev
package main
import (
2018-07-24 00:45:41 +08:00
"fmt"
2018-07-21 22:56:37 +08:00
"net/http"
_ "net/http/pprof"
)
func init() {
go func() {
2018-07-24 00:45:41 +08:00
err := http.ListenAndServe(":6060", nil)
if err != nil {
fmt.Printf("Create pprof server error: %s\n", err)
}
2018-07-21 22:56:37 +08:00
}()
}