1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-gtk.git synced 2024-12-23 04:36:49 +00:00
cchat-gtk/profile.go

21 lines
332 B
Go

// +build prof
package main
import (
"net/http"
_ "net/http/pprof"
"github.com/diamondburned/cchat-gtk/internal/log"
"github.com/pkg/errors"
)
func init() {
go func() {
if err := http.ListenAndServe("localhost:42069", nil); err != nil {
log.Error(errors.Wrap(err, "Failed to start profiling HTTP server"))
}
}()
}