From bbef2bfa785cce970978de7ec81774d1ffb05459 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Sat, 16 Jun 2018 05:14:53 -0700 Subject: [PATCH] Rename the help function to a better name --- help/help.go | 8 ++++---- wtf.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/help/help.go b/help/help.go index bac22d0a..1ae82d4b 100644 --- a/help/help.go +++ b/help/help.go @@ -11,11 +11,11 @@ import ( "github.com/senorprogrammer/wtf/weatherservices/weather" ) -func DisplayModuleInfo(moduleName string) { - if moduleName != "" { - fmt.Printf("%s\n", helpFor(moduleName)) - } else { +func Display(moduleName string) { + if moduleName == "" { fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'") + } else { + fmt.Printf("%s\n", helpFor(moduleName)) } os.Exit(0) diff --git a/wtf.go b/wtf.go index aabc4895..1e6aee8f 100644 --- a/wtf.go +++ b/wtf.go @@ -85,8 +85,8 @@ func keyboardIntercept(event *tcell.EventKey) *tcell.EventKey { return event } -func loadConfig(configFlag string) { - Config = cfg.LoadConfigFile(configFlag) +func loadConfig(filePath string) { + Config = cfg.LoadConfigFile(filePath) } // redrawApp redraws the rendered views to screen on a defined interval (set in config.yml) @@ -264,7 +264,7 @@ func main() { cmdFlags.Parse(version) if cmdFlags.HasModule() { - help.DisplayModuleInfo(cmdFlags.Module) + help.Display(cmdFlags.Module) } cfg.CreateConfigDir()