diff options
author | Emiliano Ciavatta | 2020-10-09 15:07:24 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-10-09 15:07:24 +0000 |
commit | c21541a31fe45ba3a0bafca46415247f3837713e (patch) | |
tree | 9581c6a2801556d602099a64840909a451e61ffd /caronte.go | |
parent | d203f3c7e3bcaa20895c0f32f348cd1513ae9876 (diff) |
Add MainPane
Diffstat (limited to 'caronte.go')
-rw-r--r-- | caronte.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -21,9 +21,10 @@ import ( "flag" "fmt" log "github.com/sirupsen/logrus" - "io/ioutil" ) +var Version string + func main() { mongoHost := flag.String("mongo-host", "localhost", "address of MongoDB") mongoPort := flag.Int("mongo-port", 27017, "port of MongoDB") @@ -40,12 +41,10 @@ func main() { log.WithError(err).WithFields(logFields).Fatal("failed to connect to MongoDB") } - versionBytes, err := ioutil.ReadFile("VERSION") - if err != nil { - log.WithError(err).Fatal("failed to load version file") + if Version == "" { + Version = "undefined" } - - applicationContext, err := CreateApplicationContext(storage, string(versionBytes)) + applicationContext, err := CreateApplicationContext(storage, Version) if err != nil { log.WithError(err).WithFields(logFields).Fatal("failed to create application context") } |