func main() { gnuflag.Parse(true) name := cmd.ExtractProgramName(os.Args[0]) manager := buildManager(name) args := gnuflag.Args() manager.Run(args) }
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) } }