Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/v3/examples/flags/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func main() {
Usage: "Use a randomized port",
Value: 0,
DefaultText: "random",
Action: func(ctx context.Context, cmd *cli.Command, v int64) error {
Action: func(ctx context.Context, cmd *cli.Command, v int) error {
if v >= 65536 {
return fmt.Errorf("Flag port value %v out of range[0-65535]", v)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/v3/examples/full-api-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func main() {
&cli.BoolFlag{Value: true, Name: "fancier"},
&cli.DurationFlag{Name: "howlong", Aliases: []string{"H"}, Value: time.Second * 3},
&cli.FloatFlag{Name: "howmuch"},
&cli.IntFlag{Name: "longdistance", Validator: func (t int64) error {
&cli.IntFlag{Name: "longdistance", Validator: func (t int) error {
if t < 10 {
return fmt.Errorf("10 miles isnt long distance!!!!")
}
Expand Down