From 09f8bc666c37e795ce5c22a7e4c5919c8fa7f41c Mon Sep 17 00:00:00 2001 From: Markus Grüneis Date: Fri, 24 Oct 2014 14:17:08 +0200 Subject: hub: Show usage when having arg -help --- src/hub/src/spreadspace.org/sfive-hub/s5hub.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) -- cgit v1.2.3