diff --git a/help/help.go b/help/help.go index dec44109..cf79c930 100644 --- a/help/help.go +++ b/help/help.go @@ -11,11 +11,11 @@ import ( "github.com/senorprogrammer/wtf/weather" ) -func DisplayHelpInfo(moduleName string) { +func DisplayModuleInfo(moduleName string) { if moduleName != "" { fmt.Printf("%s\n", helpFor(moduleName)) } else { - fmt.Println("\n --help takes a module name as an argument, i.e: '--help github'") + fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'") } os.Exit(0) diff --git a/wtf.go b/wtf.go index 8329bcbd..63819b53 100644 --- a/wtf.go +++ b/wtf.go @@ -203,8 +203,8 @@ func main() { cmdFlags := wtf.NewCommandFlags() cmdFlags.Parse(version) - if cmdFlags.HasInfo() { - help.DisplayHelpInfo(cmdFlags.Info) + if cmdFlags.HasModule() { + help.DisplayModuleInfo(cmdFlags.Module) } /* -------------------- end flag parsing and handling -------------------- */ diff --git a/wtf/command_flags.go b/wtf/command_flags.go index f876d8de..9b9980bb 100644 --- a/wtf/command_flags.go +++ b/wtf/command_flags.go @@ -10,7 +10,7 @@ import ( type CommandFlags struct { Config string `short:"c" long:"config" optional:"yes" description:"Path to config file"` - Info string `short:"i" long:"info" optional:"yes" description:"Display info about the specified module"` + Module string `short:"m" long:"module" optional:"yes" description:"Display info about a specific module, i.e.: 'wtf -m=todo'"` Version bool `short:"v" long:"version" description:"Show Version Info"` } @@ -25,8 +25,8 @@ func (cmdFlags *CommandFlags) HasConfig() bool { return len(cmdFlags.Config) > 0 } -func (cmdFlags *CommandFlags) HasInfo() bool { - return len(cmdFlags.Info) > 0 +func (cmdFlags *CommandFlags) HasModule() bool { + return len(cmdFlags.Module) > 0 } func (cmdFlags *CommandFlags) Parse(version string) {