remove pprof stuff
This commit is contained in:
parent
8514898072
commit
f7be4c17eb
11
main.go
11
main.go
@ -4,8 +4,6 @@ import (
|
||||
"flag"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
@ -20,19 +18,10 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
dbg := flag.Bool("debug", false, "Enable pprof debugging")
|
||||
sock := flag.String("s", "/tmp/traygent", "Socket path to create")
|
||||
cmdList := flag.String("c", "/etc/traygent.json", "List of commands to execute")
|
||||
flag.Parse()
|
||||
|
||||
if *dbg {
|
||||
go func() {
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", pprof.Profile)
|
||||
log.Fatal(http.ListenAndServe(":7777", mux))
|
||||
}()
|
||||
}
|
||||
|
||||
l, err := net.Listen("unix", *sock)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
|
Loading…
Reference in New Issue
Block a user