Example #1
0
func main() {
	if len(os.Args) < 2 {
		fmt.Fprintln(os.Stderr, "specify a command please")
		fmt.Fprintln(os.Stderr, "Commands:")
		fmt.Fprintf(os.Stderr, "  %v\n", someutils.List())
		os.Exit(1)
	}
	err := someutils.Call(os.Args[1], os.Args[1:])
	if err != nil {
		fmt.Printf("Error: %v\n", err)
		os.Exit(1)
	}
}
Example #2
0
func showHelp(msg string) {
	fmt.Fprintln(os.Stderr, "`some`")
	fmt.Fprintln(os.Stderr, msg)
	fmt.Fprintln(os.Stderr, " Available commands:")
	fmt.Fprintf(os.Stderr, " %v\n", someutils.List())
}
Example #3
0
func showHelp() {
	fmt.Fprintln(os.Stderr, "`someutils`")
	fmt.Fprintln(os.Stderr, " No command specified.")
	fmt.Fprintln(os.Stderr, " Available commands:")
	fmt.Fprintf(os.Stderr, " %v\n", someutils.List())
}
Example #4
0
func showHelp() {
	fmt.Fprintln(os.Stderr, "specify a command please")
	fmt.Fprintln(os.Stderr, "Commands:")
	fmt.Fprintf(os.Stderr, "  %v\n", someutils.List())
}