Move vInfo (in var its not initialized yet)

This commit is contained in:
Jannis Mattheis 2018-02-21 19:39:46 +01:00
parent 9bf6b0dd93
commit a22ace4f7d
1 changed files with 6 additions and 5 deletions

11
app.go
View File

@ -16,18 +16,19 @@ import (
var ( var (
// Version the version of Gotify. // Version the version of Gotify.
Version = "unknown" Version = "unknown"
// Commit the git commit hash of this version. // Commit the git commit hash of this version.
Commit = "unknown" Commit = "unknown"
// BuildDate the date on which this binary was build. // BuildDate the date on which this binary was build.
BuildDate = "unknown" BuildDate = "unknown"
// Branch the git branch of this version. // Branch the git branch of this version.
Branch = "unknown" Branch = "unknown"
vInfo = &model.VersionInfo{Version: Version, Commit: Commit, BuildDate: BuildDate, Branch: Branch}
) )
func main() { func main() {
fmt.Println("Starting Gotify version", Version+"@"+BuildDate) vInfo := &model.VersionInfo{Version: Version, Commit: Commit, BuildDate: BuildDate, Branch: Branch}
fmt.Println("Starting Gotify version", vInfo.Version+"@"+BuildDate)
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
conf := config.Get() conf := config.Get()
db, err := database.New(conf.Database.Dialect, conf.Database.Connection, conf.DefaultUser.Name, conf.DefaultUser.Pass) db, err := database.New(conf.Database.Dialect, conf.Database.Connection, conf.DefaultUser.Name, conf.DefaultUser.Pass)