mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Rename the help function to a better name
This commit is contained in:
parent
dcbc541221
commit
bbef2bfa78
@ -11,11 +11,11 @@ import (
|
|||||||
"github.com/senorprogrammer/wtf/weatherservices/weather"
|
"github.com/senorprogrammer/wtf/weatherservices/weather"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DisplayModuleInfo(moduleName string) {
|
func Display(moduleName string) {
|
||||||
if moduleName != "" {
|
if moduleName == "" {
|
||||||
fmt.Printf("%s\n", helpFor(moduleName))
|
|
||||||
} else {
|
|
||||||
fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'")
|
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)
|
os.Exit(0)
|
||||||
|
6
wtf.go
6
wtf.go
@ -85,8 +85,8 @@ func keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
|||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadConfig(configFlag string) {
|
func loadConfig(filePath string) {
|
||||||
Config = cfg.LoadConfigFile(configFlag)
|
Config = cfg.LoadConfigFile(filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// redrawApp redraws the rendered views to screen on a defined interval (set in config.yml)
|
// redrawApp redraws the rendered views to screen on a defined interval (set in config.yml)
|
||||||
@ -264,7 +264,7 @@ func main() {
|
|||||||
cmdFlags.Parse(version)
|
cmdFlags.Parse(version)
|
||||||
|
|
||||||
if cmdFlags.HasModule() {
|
if cmdFlags.HasModule() {
|
||||||
help.DisplayModuleInfo(cmdFlags.Module)
|
help.Display(cmdFlags.Module)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.CreateConfigDir()
|
cfg.CreateConfigDir()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user