From e39565377e7828ddb93b44f2b185f3a2311d82fd Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Mon, 5 Nov 2018 21:39:15 +0100 Subject: [PATCH] Add pprof debug server --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index 2371d82..04f23d1 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,9 @@ import ( "context" "github.com/sirupsen/logrus" "github.com/urfave/cli" + "log" + "net/http" + _ "net/http/pprof" "net/url" "os" "strings" @@ -33,6 +36,9 @@ func init() { func main() { app.Run(os.Args) + go func() { + log.Println(http.ListenAndServe("localhost:42069", nil)) + }() } func cmdCrawler(clic *cli.Context) error {