diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..467b15a --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.tebibyte.media/sashakoshka/ezprof + +go 1.20 diff --git a/hook/hook.go b/hook/hook.go new file mode 100644 index 0000000..373bb7c --- /dev/null +++ b/hook/hook.go @@ -0,0 +1,11 @@ +package hook + +import "net/http" +import _ "net/http/pprof" + +func init () { + go func () { + err := http.ListenAndServe("localhost:9090", nil) + if err != nil { panic(err.Error()) } + } () +}