Skip to content

Commit

Permalink
Rename the help function to a better name
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Jun 16, 2018
1 parent dcbc541 commit bbef2bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions help/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions wtf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -264,7 +264,7 @@ func main() {
cmdFlags.Parse(version)

if cmdFlags.HasModule() {
help.DisplayModuleInfo(cmdFlags.Module)
help.Display(cmdFlags.Module)
}

cfg.CreateConfigDir()
Expand Down

0 comments on commit bbef2bf

Please sign in to comment.