func main() { flag.Usage = func() { fmt.Fprintf(os.Stderr, "usage: juju-stateservers machine-id...\n") flag.PrintDefaults() os.Exit(2) } flag.Parse(true) if err := setStateServers(flag.Args()); err != nil { fmt.Fprintf(os.Stderr, "cannot set state servers: %v\n", err) os.Exit(1) } }
// Usage func usage() { fmt.Fprintf(os.Stderr, "usage %s [options]\n", os.Args[0]) gnuflag.PrintDefaults() }