aboutsummaryrefslogtreecommitdiff
path: root/caronte.go
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-10-09 15:07:24 +0000
committerEmiliano Ciavatta2020-10-09 15:07:24 +0000
commitc21541a31fe45ba3a0bafca46415247f3837713e (patch)
tree9581c6a2801556d602099a64840909a451e61ffd /caronte.go
parentd203f3c7e3bcaa20895c0f32f348cd1513ae9876 (diff)
Add MainPane
Diffstat (limited to 'caronte.go')
-rw-r--r--caronte.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/caronte.go b/caronte.go
index d4265bc..2d24af6 100644
--- a/caronte.go
+++ b/caronte.go
@@ -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")
}