mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
General refactor of the cmd package (#3328)
* General refactor of the cmd package * Address breakage in runCreateUser * Place "common" functions into cmd.go
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
079273e2ff
commit
2b52f77e1b
@@ -121,11 +121,9 @@ func runWeb(ctx *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
var listenAddr string
|
||||
if setting.Protocol == setting.UnixSocket {
|
||||
listenAddr = fmt.Sprintf("%s", setting.HTTPAddr)
|
||||
} else {
|
||||
listenAddr = fmt.Sprintf("%s:%s", setting.HTTPAddr, setting.HTTPPort)
|
||||
listenAddr := setting.HTTPAddr
|
||||
if setting.Protocol != setting.UnixSocket {
|
||||
listenAddr += ":" + setting.HTTPPort
|
||||
}
|
||||
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubURL)
|
||||
|
||||
@@ -135,6 +133,7 @@ func runWeb(ctx *cli.Context) error {
|
||||
|
||||
if setting.EnablePprof {
|
||||
go func() {
|
||||
log.Info("Starting pprof server on localhost:6060")
|
||||
log.Info("%v", http.ListenAndServe("localhost:6060", nil))
|
||||
}()
|
||||
}
|
||||
|
Reference in New Issue
Block a user