mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Re-add command line help
This commit is contained in:
22
help/help.go
Normal file
22
help/help.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package help
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
//"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/maker"
|
||||
)
|
||||
|
||||
func Display(moduleName string, config *config.Config) {
|
||||
if moduleName == "" {
|
||||
fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'")
|
||||
} else {
|
||||
fmt.Printf("%s\n", helpFor(moduleName, config))
|
||||
}
|
||||
}
|
||||
|
||||
func helpFor(moduleName string, config *config.Config) string {
|
||||
widget := maker.MakeWidget(nil, nil, moduleName, moduleName, config, config)
|
||||
return widget.HelpText()
|
||||
}
|
||||
Reference in New Issue
Block a user