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"
"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)