mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-04-19 18:36:43 +00:00
Add pprof debug server
This commit is contained in:
parent
77cb45dbec
commit
e39565377e
6
main.go
6
main.go
@ -4,6 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
_ "net/http/pprof"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
@ -33,6 +36,9 @@ func init() {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app.Run(os.Args)
|
app.Run(os.Args)
|
||||||
|
go func() {
|
||||||
|
log.Println(http.ListenAndServe("localhost:42069", nil))
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func cmdCrawler(clic *cli.Context) error {
|
func cmdCrawler(clic *cli.Context) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user