summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarkus Grüneis <gimpf@gimpf.org>2014-10-24 14:17:08 +0200
committerMarkus Grüneis <gimpf@gimpf.org>2014-10-24 14:17:08 +0200
commit09f8bc666c37e795ce5c22a7e4c5919c8fa7f41c (patch)
tree1aaa3c2163b20dc6a67c95f47487a2eb8323868b /src
parenthub: Use more practical query in .test-client script. (diff)
hub: Show usage when having arg -help
Diffstat (limited to 'src')
-rw-r--r--src/hub/src/spreadspace.org/sfive-hub/s5hub.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hub/src/spreadspace.org/sfive-hub/s5hub.go b/src/hub/src/spreadspace.org/sfive-hub/s5hub.go
index 2509139..192243f 100644
--- a/src/hub/src/spreadspace.org/sfive-hub/s5hub.go
+++ b/src/hub/src/spreadspace.org/sfive-hub/s5hub.go
@@ -20,10 +20,16 @@ func main() {
startWeb := flag.Bool("start-web-server", true, "start a webserver")
forward := flag.String("forward-url", "", "forward to another sfive-server with http server at base-url")
vizAppDir := flag.String("viz-dir", "./viz", "base-path to the viz application")
+ help := flag.Bool("help", false, "show usage")
flag.Parse()
s5hl.Printf("Hello, world.\n")
+ if *help {
+ flag.Usage()
+ return
+ }
+
server, err := sfive.NewServer(*db)
if err != nil {
s5hl.Fatalf("failed to initialize: %v", err)