1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
imgproxy/pprof.go

23 lines
250 B
Go
Raw Normal View History

2021-11-15 11:37:56 +02:00
//go:build pprof
// +build pprof
package main
import (
"net/http"
_ "net/http/pprof"
"os"
)
func init() {
bind := os.Getenv("IMGPROXY_PPROF_BIND")
if len(bind) == 0 {
bind = ":8088"
}
go func() {
http.ListenAndServe(bind, nil)
}()
}