mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Pull command flags out of main() and into its own file
This commit is contained in:
21
help/help.go
21
help/help.go
@@ -11,22 +11,6 @@ import (
|
||||
"github.com/senorprogrammer/wtf/weather"
|
||||
)
|
||||
|
||||
//func DisplayCommandInfo(args []string, version string) {
|
||||
//if len(args) == 0 {
|
||||
//return
|
||||
//}
|
||||
|
||||
//cmd := args[0]
|
||||
|
||||
//switch cmd {
|
||||
//case "help", "--help":
|
||||
//DisplayHelpInfo(args)
|
||||
//case "version", "--version":
|
||||
//DisplayVersionInfo(version)
|
||||
//}
|
||||
|
||||
//}
|
||||
|
||||
func DisplayHelpInfo(moduleName string) {
|
||||
if moduleName != "" {
|
||||
fmt.Printf("%s\n", helpFor(moduleName))
|
||||
@@ -37,11 +21,6 @@ func DisplayHelpInfo(moduleName string) {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func DisplayVersionInfo(version string) {
|
||||
fmt.Printf("Version: %s\n", version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func helpFor(moduleName string) string {
|
||||
switch moduleName {
|
||||
case "git":
|
||||
|
||||
Reference in New Issue
Block a user