Merge pull request #1163 from weaveworks/checkpoint

Don't read from app.Version before we initialise it
This commit is contained in:
Matthias Radestock
2016-03-12 11:27:26 +00:00

View File

@@ -48,6 +48,11 @@ func appMain() {
defer log.Info("app exiting")
rand.Seed(time.Now().UnixNano())
app.UniqueID = strconv.FormatInt(rand.Int63(), 16)
app.Version = version
log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID)
// Start background version checking
checkpoint.CheckInterval(&checkpoint.CheckParams{
Product: "scope-app",
@@ -61,11 +66,6 @@ func appMain() {
}
})
rand.Seed(time.Now().UnixNano())
app.UniqueID = strconv.FormatInt(rand.Int63(), 16)
app.Version = version
log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID)
// If user supplied a weave router address, periodically try and register
// out IP address in WeaveDNS.
if *weaveAddr != "" {