remove pprof stuff

This commit is contained in:
Aaron Bieber 2023-11-12 19:14:36 -07:00
parent 8514898072
commit f7be4c17eb
No known key found for this signature in database

11
main.go
View File

@ -4,8 +4,6 @@ import (
"flag" "flag"
"log" "log"
"net" "net"
"net/http"
"net/http/pprof"
"time" "time"
"fyne.io/fyne/v2" "fyne.io/fyne/v2"
@ -20,19 +18,10 @@ import (
) )
func main() { func main() {
dbg := flag.Bool("debug", false, "Enable pprof debugging")
sock := flag.String("s", "/tmp/traygent", "Socket path to create") sock := flag.String("s", "/tmp/traygent", "Socket path to create")
cmdList := flag.String("c", "/etc/traygent.json", "List of commands to execute") cmdList := flag.String("c", "/etc/traygent.json", "List of commands to execute")
flag.Parse() 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) l, err := net.Listen("unix", *sock)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)