From 8040e56bd0895471cba174303665c74e65e42656 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 8 Mar 2023 20:16:09 -0500 Subject: [PATCH] Add files --- go.mod | 3 +++ hook/hook.go | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 go.mod create mode 100644 hook/hook.go 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()) } + } () +}