mirror of
https://github.com/diamondburned/cchat-gtk.git
synced 2025-01-11 04:56:47 +00:00
21 lines
332 B
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"))
|
||
|
}
|
||
|
}()
|
||
|
}
|