Skip to content

Commit dcbe38d

Browse files
committed
up: update some deps version, fix app help display error
1 parent f54ac5a commit dcbe38d

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

app_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func TestApp_Run_command_withArguments(t *testing.T) {
217217
},
218218
})
219219

220-
// run an command
220+
// run a command
221221
code := app.Run([]string{"test"})
222222
is.Eq(0, code)
223223
is.Eq("", argStr)

gflag/parser.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,11 @@ func (p *Parser) BuildOptsHelp() string {
403403
var sb strings.Builder
404404

405405
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+
}
408411
})
409412

410413
return sb.String()

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/gookit/color v1.5.2
7-
github.com/gookit/goutil v0.5.14
7+
github.com/gookit/goutil v0.5.15
88
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
99
)
1010

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
55
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=
88
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
99
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
1010
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

0 commit comments

Comments
 (0)