From c228f57ddf290c20276ac8d4a3ac6bbd0a657788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatko=20=C4=8Calu=C5=A1i=C4=87?= Date: Fri, 30 Dec 2016 21:56:07 +0100 Subject: [PATCH] Report version on startup --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index a241529..5565589 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "net/http" "os" "path/filepath" + "runtime" "runtime/pprof" "github.com/spf13/cobra" @@ -74,9 +75,13 @@ func setupMux() *goji.Mux { return mux } +var version = "manually" + func runRoot(cmd *cobra.Command, args []string) error { log.SetFlags(0) + log.Printf("rest-server %s compiled with %v on %v/%v\n", version, runtime.Version(), runtime.GOOS, runtime.GOARCH) + if config.cpuprofile != "" { f, err := os.Create(config.cpuprofile) if err != nil {