mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Get --module=[modname] working again (broke when position config validation was added)
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
// Display displays the output of the --help argument
|
||||
func Display(moduleName string, config *config.Config) {
|
||||
if moduleName == "" {
|
||||
fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'")
|
||||
@@ -17,9 +18,13 @@ func Display(moduleName string, config *config.Config) {
|
||||
}
|
||||
|
||||
func helpFor(moduleName string, config *config.Config) string {
|
||||
widget := maker.MakeWidget(nil, nil, moduleName, moduleName, config, config)
|
||||
modConfig, _ := config.Get("wtf.mods." + moduleName)
|
||||
widget := maker.MakeWidget(nil, nil, moduleName, moduleName, modConfig, config)
|
||||
|
||||
result := ""
|
||||
result += utils.StripColorTags(widget.HelpText())
|
||||
result += "\n"
|
||||
result += "Configuration Attributes"
|
||||
result += widget.ConfigText()
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user