mirror of
https://github.com/status-im/consul.git
synced 2025-02-18 00:27:04 +00:00
Fix the check for displaying the command options
This commit is contained in:
parent
8009432b1b
commit
edc353914d
@ -130,16 +130,18 @@ func (m *Meta) helpFlagsFor(f *flag.FlagSet) string {
|
|||||||
|
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
|
|
||||||
if f.NFlag() > 0 {
|
first := true
|
||||||
printTitle(&out, "Command Options")
|
f.VisitAll(func(f *flag.Flag) {
|
||||||
f.VisitAll(func(f *flag.Flag) {
|
// Skip HTTP flags as they will be grouped separately
|
||||||
// Skip HTTP flags as they will be grouped separately
|
if flagContains(httpFlags, f) {
|
||||||
if flagContains(httpFlags, f) {
|
return
|
||||||
return
|
}
|
||||||
}
|
if first {
|
||||||
printFlag(&out, f)
|
printTitle(&out, "Command Options")
|
||||||
})
|
first = false
|
||||||
}
|
}
|
||||||
|
printFlag(&out, f)
|
||||||
|
})
|
||||||
|
|
||||||
if m.hasHTTP() {
|
if m.hasHTTP() {
|
||||||
printTitle(&out, "HTTP API Options")
|
printTitle(&out, "HTTP API Options")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user