@ -19,6 +19,7 @@ import (
"github.com/rqlite/rqlite/auth"
"github.com/rqlite/rqlite/cluster"
"github.com/rqlite/rqlite/cmd"
"github.com/rqlite/rqlite/disco"
httpd "github.com/rqlite/rqlite/http"
"github.com/rqlite/rqlite/store"
@ -36,15 +37,6 @@ const logo = `
| _ |
`
// These variables are populated via the Go linker.
var (
version = "6"
commit = "unknown"
branch = "unknown"
buildtime = "unknown"
features = [ ] string { }
)
var httpAddr string
var httpAdv string
var joinSrcIP string
@ -148,7 +140,7 @@ func main() {
if showVersion {
fmt . Printf ( "%s %s %s %s %s (commit %s, branch %s)\n" ,
name , v ersion, runtime . GOOS , runtime . GOARCH , runtime . Version ( ) , c ommit, b ranch)
name , cmd. V ersion, runtime . GOOS , runtime . GOARCH , runtime . Version ( ) , c md. Commit , cmd . B ranch)
os . Exit ( 0 )
}
@ -173,7 +165,7 @@ func main() {
log . SetFlags ( log . LstdFlags )
log . SetOutput ( os . Stderr )
log . SetPrefix ( fmt . Sprintf ( "[%s] " , name ) )
log . Printf ( "%s starting, version %s, commit %s, branch %s" , name , version, commit , b ranch)
log . Printf ( "%s starting, version %s, commit %s, branch %s" , name , cmd. Version , cmd . Commit , cmd . B ranch)
log . Printf ( "%s, target architecture is %s, operating system target is %s" , runtime . Version ( ) , runtime . GOARCH , runtime . GOOS )
log . Printf ( "launch command: %s" , strings . Join ( os . Args , " " ) )
@ -404,10 +396,10 @@ func startHTTPService(str *store.Store, cltr *cluster.Service) error {
s . Expvar = expvar
s . Pprof = pprofEnabled
s . BuildInfo = map [ string ] interface { } {
"commit" : c ommit,
"branch" : b ranch,
"version" : v ersion,
"build_time" : b uildtime,
"commit" : c md. C ommit,
"branch" : cmd. B ranch,
"version" : cmd. V ersion,
"build_time" : cmd. B uildtime,
}
return s . Start ( )
}