🔧 Enable pprof by default for now
This commit is contained in:
parent
16c0564c04
commit
ddc73036a8
|
@ -30,7 +30,6 @@ type (
|
|||
Protocol string `env:"PROTOCOL" envDefault:"http"`
|
||||
RootURL string `env:"ROOT_URL" envDefault:"{{protocol}}://{{domain}}:{{port}}/"`
|
||||
StaticURLPrefix string `env:"STATIC_URL_PREFIX"`
|
||||
EnablePprof bool `env:"ENABLE_PPROF"`
|
||||
}
|
||||
|
||||
ConfigDatabase struct {
|
||||
|
@ -88,7 +87,6 @@ func TestConfig(tb testing.TB) *Config {
|
|||
Server: ConfigServer{
|
||||
CertificateFile: filepath.Join("https", "cert.pem"),
|
||||
Domain: "localhost",
|
||||
EnablePprof: false,
|
||||
Host: "0.0.0.0",
|
||||
KeyFile: filepath.Join("https", "key.pem"),
|
||||
Port: "3000",
|
||||
|
|
6
main.go
6
main.go
|
@ -101,17 +101,13 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
var (
|
||||
cpuProfilePath, memProfilePath string
|
||||
enablePprof bool
|
||||
)
|
||||
var cpuProfilePath, memProfilePath string
|
||||
|
||||
//go:embed assets/*
|
||||
var staticFS embed.FS
|
||||
|
||||
//nolint:gochecknoinits
|
||||
func init() {
|
||||
flag.BoolVar(&enablePprof, "pprof", false, "enable pprof mode")
|
||||
flag.StringVar(&cpuProfilePath, "cpuprofile", "", "set path to saving CPU memory profile")
|
||||
flag.StringVar(&memProfilePath, "memprofile", "", "set path to saving pprof memory profile")
|
||||
flag.Parse()
|
||||
|
|
Loading…
Reference in New Issue