File tree 4 files changed +9
-6
lines changed
4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ func TestApp_Run_command_withArguments(t *testing.T) {
217
217
},
218
218
})
219
219
220
- // run an command
220
+ // run a command
221
221
code := app .Run ([]string {"test" })
222
222
is .Eq (0 , code )
223
223
is .Eq ("" , argStr )
Original file line number Diff line number Diff line change @@ -403,8 +403,11 @@ func (p *Parser) BuildOptsHelp() string {
403
403
var sb strings.Builder
404
404
405
405
p .fSet .VisitAll (func (f * flag.Flag ) {
406
- sb .WriteString (p .formatOneFlag (f ))
407
- sb .WriteByte ('\n' )
406
+ line := p .formatOneFlag (f )
407
+ if line != "" {
408
+ sb .WriteString (line )
409
+ sb .WriteByte ('\n' )
410
+ }
408
411
})
409
412
410
413
return sb .String ()
Original file line number Diff line number Diff line change 4
4
5
5
require (
6
6
github.com/gookit/color v1.5.2
7
- github.com/gookit/goutil v0.5.14
7
+ github.com/gookit/goutil v0.5.15
8
8
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
9
9
)
10
10
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
3
3
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
4
4
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI =
5
5
github.com/gookit/color v1.5.2 /go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg =
6
- github.com/gookit/goutil v0.5.14 h1:8TicCMSkpARD11SpiGJnRzUt2z3CTu+0YAq/zj2Yoag =
7
- github.com/gookit/goutil v0.5.14 /go.mod h1:ozPE16eJS9f89aVbVk05ocEJsia3KPrYUqPTs8GvUTw =
6
+ github.com/gookit/goutil v0.5.15 h1:FaRyj0uVqi7j92QHsG+2Sc1VZ7/7ma77UD3/wBpwyTc =
7
+ github.com/gookit/goutil v0.5.15 /go.mod h1:ozPE16eJS9f89aVbVk05ocEJsia3KPrYUqPTs8GvUTw =
8
8
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ =
9
9
github.com/mattn/go-isatty v0.0.16 /go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM =
10
10
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
You can’t perform that action at this time.
0 commit comments