Example #1
0
File: main.go Project: nsf/torgo
func dispatch_command() {
	switch os.Args[1] {
	case "make":
		make.Tool()
	case "view":
		view.Tool()
	case "client":
		client.Tool()
	case "-h", "--help", "help":
		print_version()
		fmt.Print(main_help)
	case "-v", "--version", "version":
		print_version()
	default:
		fmt.Fprintf(os.Stderr, "unknown command: %s", os.Args[1])
		os.Exit(1)
	}
}
Example #2
0
File: main.go Project: nsf/torgo
func main() {
	if len(os.Args) == 1 {
		client.Tool()
	}
	dispatch_command()
}