diff --git a/goconvey.go b/goconvey.go index f569d594..0bcb27ff 100644 --- a/goconvey.go +++ b/goconvey.go @@ -15,6 +15,7 @@ import ( "path/filepath" "regexp" "runtime" + "runtime/debug" "strconv" "strings" "time" @@ -58,7 +59,12 @@ func folders() { func main() { flag.Parse() - log.Printf(initialConfiguration, host, port, nap, cover) + + serverVersion := "" + if binfo, ok := debug.ReadBuildInfo(); ok { + serverVersion = binfo.Main.Version + } + log.Printf(initialConfiguration, host, port, nap, cover, serverVersion) working := getWorkDir() cover = coverageEnabled(cover, reports) @@ -309,7 +315,7 @@ var ( ) const ( - initialConfiguration = "Initial configuration: [host: %s] [port: %d] [poll: %v] [cover: %v]\n" + initialConfiguration = "Initial configuration: [host: %s] [port: %d] [poll: %v] [cover: %v] [server version: %s]\n" pleaseUpgradeGoVersion = "Go version is less that 1.2 (%s), please upgrade to the latest stable version to enable coverage reporting.\n" coverToolMissing = "Go cover tool is not installed or not accessible: for Go < 1.5 run`go get golang.org/x/tools/cmd/cover`\n For >= Go 1.5 run `go install $GOROOT/src/cmd/cover`\n" reportDirectoryUnavailable = "Could not find or create the coverage report directory (at: '%s'). You probably won't see any coverage statistics...\n"