remove pprof stuff
This commit is contained in:
parent
8514898072
commit
f7be4c17eb
11
main.go
11
main.go
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user