summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-04-17 19:47:08 +0300
committerPaul Buetow <paul@buetow.org>2023-05-17 23:22:49 +0300
commitcd5a1478064ac01a9f1369101ac35c10d32df635 (patch)
treea4b7f1f65f5fc75883db8c18972ea29f984eab59 /cmd
parente96f62acfd73d1c6b9a540927ada2ac8c81cffc1 (diff)
initial version
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gorum/main.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmd/gorum/main.go b/cmd/gorum/main.go
new file mode 100644
index 0000000..223da9d
--- /dev/null
+++ b/cmd/gorum/main.go
@@ -0,0 +1,28 @@
+package main
+
+import (
+ "context"
+ "flag"
+ "fmt"
+
+ "codeberg.org/snonux/gorum/internal"
+)
+
+const versionStr = "v0.0.0"
+
+func main() {
+ configFile := flag.String("cfg", "/etc/gorum.json", "The config file")
+ version := flag.Bool("version", false, "Display version")
+ flag.Parse()
+
+ if *version {
+ fmt.Printf("This is Gorum version %s; (C) by Paul Buetow\n", versionStr)
+ fmt.Println("https://codeberg.org/snonux/gorum")
+ return
+ }
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+
+ internal.Run(ctx, *configFile)
+}