From: Bernhard Tittelbach Date: Sun, 6 Oct 2013 00:10:53 +0000 (+0000) Subject: better help X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=59b5b0d11e44853e93a5a66dc66133254f844753;p=svn42.git better help --- diff --git a/go/door_client_zmq/main.go b/go/door_client_zmq/main.go index 13d6022..7ce4fb8 100644 --- a/go/door_client_zmq/main.go +++ b/go/door_client_zmq/main.go @@ -21,17 +21,11 @@ var ( cmd_user_ string ) -func usage() { - fmt.Fprintf(os.Stderr, "Usage: door_client_zmq\n") - flag.PrintDefaults() -} - func init() { flag.StringVar(&cmd_port_, "cmdport", "ipc:///run/tuer/door_cmd.ipc", "zmq command socket path") flag.StringVar(&sub_port_, "pubport", "tcp://torwaechter.realraum.at:4242", "zmq subscribe/listen socket path") flag.StringVar(&cmd_method_, "method", "", "zmq cmd method") flag.StringVar(&cmd_user_, "usernick", "", "zmq cmd user identity") - flag.Usage = usage flag.Parse() } diff --git a/go/door_daemon_zmq/main.go b/go/door_daemon_zmq/main.go index 3ff5657..606c364 100644 --- a/go/door_daemon_zmq/main.go +++ b/go/door_daemon_zmq/main.go @@ -29,17 +29,11 @@ var ( Syslog_ *log.Logger ) -func usage() { - fmt.Fprintf(os.Stderr, "Usage: door_daemon_0mq \n") - flag.PrintDefaults() -} - func init() { flag.StringVar(&cmd_port_, "cmdport", "ipc:///run/tuer/door_cmd.ipc", "zmq command socket path") flag.StringVar(&pub_port_, "pubport", "tcp://*:4242", "zmq public/listen socket path") flag.StringVar(&door_tty_path_, "device", "/dev/door", "door tty device path") flag.BoolVar(&use_syslog_, "syslog", false, "log to syslog local1 facility") - flag.Usage = usage flag.Parse() } diff --git a/go/r3-eventbroker_zmq/main.go b/go/r3-eventbroker_zmq/main.go index c80ea3a..8ea5fe4 100644 --- a/go/r3-eventbroker_zmq/main.go +++ b/go/r3-eventbroker_zmq/main.go @@ -32,11 +32,6 @@ var ( enable_debuglog_ bool ) -func usage() { - fmt.Fprintf(os.Stderr, "Usage: zmq_broker_event_transformer [options]\n") - flag.PrintDefaults() -} - func init() { flag.StringVar(&door_cmd_addr_, "doorcmdaddr", "ipc:///run/tuer/door_cmd.ipc", "zmq door event publish addr") flag.StringVar(&doorsub_addr_, "doorsubaddr", "tcp://torwaechter.realraum.at:4242", "zmq door event publish addr") @@ -46,7 +41,6 @@ func init() { flag.StringVar(&brain_listen_addr_, "brainlisten", "tcp://*:4245", "address to listen for requests about latest stored event") flag.BoolVar(&use_syslog_, "syslog", false, "log to syslog local2 facility") flag.BoolVar(&enable_debuglog_, "debug", false, "enable debug logging") - flag.Usage = usage flag.Parse() } diff --git a/go/uc_sensor_node_zmq/main.go b/go/uc_sensor_node_zmq/main.go index 434f553..52a8aad 100644 --- a/go/uc_sensor_node_zmq/main.go +++ b/go/uc_sensor_node_zmq/main.go @@ -19,7 +19,6 @@ func init() { flag.StringVar(&pub_addr, "brokeraddr", "tcp://torwaechter.realraum.at:4244", "zmq address to send stuff to") flag.StringVar(&tty_dev_, "ttydev", "/dev/ttyACM0", "path do tty uc device") flag.BoolVar(&use_syslog_, "syslog", false, "log to syslog local1 facility") - //~ flag.Usage = flag.PrintDefaults flag.Parse() }