diff options
| author | 2025-11-03 13:55:04 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:12:09 +0100 | |
| commit | 81e3cdda44a2aed1ad0805fa738429c891b6209d (patch) | |
| tree | d9c3c95eb721e1dc1c613ee7370eaad9ec8796f7 /vendor/github.com/jessevdk/go-flags/help.go | |
| parent | [chore] add a 'nos3' build tag to support compiling without S3 storage suppor... (diff) | |
| download | gotosocial-81e3cdda44a2aed1ad0805fa738429c891b6209d.tar.xz | |
[chore] update dependencies (#4539)
- github.com/KimMachineGun/automemlimit: v0.7.4 -> v0.7.5
- github.com/tdewolff/minify/v2: v2.24.4 -> v2.24.5
- modernc.org/sqlite: v1.39.1 -> v1.40.0 w/ concurrency workaround
- github.com/go-swagger/go-swagger: v0.32.3 -> v0.33.1 (and drops use of our custom fork now the fix is available upstream)
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4539
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/jessevdk/go-flags/help.go')
| -rw-r--r-- | vendor/github.com/jessevdk/go-flags/help.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/vendor/github.com/jessevdk/go-flags/help.go b/vendor/github.com/jessevdk/go-flags/help.go index 068fce152..8fd324443 100644 --- a/vendor/github.com/jessevdk/go-flags/help.go +++ b/vendor/github.com/jessevdk/go-flags/help.go @@ -72,15 +72,15 @@ func (p *Parser) getAlignmentInfo() alignmentInfo { var prevcmd *Command p.eachActiveGroup(func(c *Command, grp *Group) { - if !grp.showInHelp() { - return - } if c != prevcmd { for _, arg := range c.args { ret.updateLen(arg.Name, c != p.Command) } + prevcmd = c + } + if !grp.showInHelp() { + return } - for _, info := range grp.options { if !info.showInHelp() { continue @@ -334,7 +334,11 @@ func (p *Parser) WriteHelp(writer io.Writer) { } if !allcmd.ArgsRequired { - fmt.Fprintf(wr, "[%s]", name) + if arg.Required > 0 { + fmt.Fprintf(wr, "%s", name) + } else { + fmt.Fprintf(wr, "[%s]", name) + } } else { fmt.Fprintf(wr, "%s", name) } |
