dump only used config when starting
This commit is contained in:
parent
f98445d0be
commit
50bf31f9e6
1 changed files with 19 additions and 1 deletions
|
|
@ -191,7 +191,25 @@ func main() {
|
|||
}
|
||||
|
||||
showVersion()
|
||||
dumpConfig()
|
||||
|
||||
// dump used configure only
|
||||
{
|
||||
fmt.Println()
|
||||
for _, gk := range []string{"sshpiperd", "upstream." + config.UpstreamDriver, "challenger." + config.ChallengerDriver, "auditor." + config.AuditorDriver} {
|
||||
|
||||
g := parser.Group.Find(gk)
|
||||
if g == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
fmt.Println("[" + g.ShortDescription + "]")
|
||||
for _, o := range g.Options() {
|
||||
fmt.Printf("%v = %v", o.LongName, o.Value())
|
||||
fmt.Println()
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
|
||||
return startPiper(&config.piperdConfig, config.createLogger())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue