1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/help/help.go
2018-05-16 10:39:24 -07:00

33 lines
440 B
Go

package help
import (
"fmt"
"os"
)
func DisplayCommandInfo(args []string, version string) {
if len(args) == 0 {
return
}
cmd := args[0]
switch cmd {
case "help", "--help":
DisplayHelpInfo()
case "version", "--version":
DisplayVersionInfo(version)
}
}
func DisplayHelpInfo() {
fmt.Println("Help is coming...")
os.Exit(0)
}
func DisplayVersionInfo(version string) {
fmt.Printf("Version: %s\n", version)
os.Exit(0)
}