Report version on startup

This commit is contained in:
Zlatko Čalušić 2016-12-30 21:56:07 +01:00
parent 0f4373ed7f
commit c228f57ddf

View file

@ -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 {