package zdaemon import ( "fmt" "os" ) func (zd *ZDaemon) help_install() { fmt.Println("Usage: ", zd.daemonName, "install ") fmt.Println("install_type:") fmt.Println("\twinsvc\t\tWindows service") fmt.Println("\twintray\t\tWindows program with tray icon") fmt.Println("\tsysv\t\tLinux sysv") fmt.Println("\tsystemd\t\tLinux systemd") fmt.Println("\topenwrt\t\tOpenwrt service") } func (zd *ZDaemon) help() { if len(os.Args) == 3 { cmd := os.Args[2] switch cmd { case "install": zd.help_install() break case "uninstall": fmt.Println("This command will uninstall what installed.") break case "start": fmt.Println("This command will start daemon.") break case "stop": fmt.Println("This command will stop daemon.") break case "restart": fmt.Println("This command will restart daemon.") break case "status": fmt.Println("This command will print daemon status.") break case "help": fmt.Println("...? What's your problem? Do you like recurse?") break case "enable": fmt.Println("This command will enable auto startup") break case "disable": fmt.Println("This command will disable auto startup") break default: fmt.Println("Usage: ", zd.daemonName, "help {start|stop|restart|install|uninstall|enable|disable}") break } } else { fmt.Println("Usage: ", zd.daemonName, "help {start|stop|restart|install|uninstall|enable|disable}") } }