Introduce #version
This commit is contained in:
parent
37aacf973b
commit
69497c77e4
@ -13,7 +13,7 @@ var (
|
||||
func SetupLogging() {
|
||||
logger = log.New(os.Stdout, "", log.Ldate|log.Lmicroseconds)
|
||||
|
||||
Log("Burlesque started in %s environment", Config.Env)
|
||||
Log("Burlesque v%s started in %s environment", Version, Config.Env)
|
||||
Log("GOMAXPROCS is set to %d", runtime.GOMAXPROCS(-1))
|
||||
Log("Storage path: %s", Config.Storage)
|
||||
Log("Server is running at http://127.0.0.1:%d", Config.Port)
|
||||
|
4
main.go
4
main.go
@ -8,6 +8,10 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
const (
|
||||
Version = "0.1.3"
|
||||
)
|
||||
|
||||
func HandleShutdown() {
|
||||
ch := make(chan os.Signal)
|
||||
signal.Notify(ch, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGINT)
|
||||
|
@ -30,6 +30,7 @@ func StatusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func DebugHandler(w http.ResponseWriter, r *http.Request) {
|
||||
info := make(map[string]interface{})
|
||||
info["version"] = Version
|
||||
info["goroutines"] = runtime.NumGoroutine()
|
||||
|
||||
s, err := storage.Status()
|
||||
|
Loading…
x
Reference in New Issue
Block a user