Skip to content

Commit bb899c0

Browse files
authored
Merge pull request #6 from titoe218/patch-1
Update main.go
2 parents 802fe8a + 25d4e70 commit bb899c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chap1/manual-parse/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func printUsage(w io.Writer) {
2424
}
2525

2626
func validateArgs(c config) error {
27-
if !(c.numTimes > 0) {
27+
if c.numTimes <= 0 && !c.printUsage {
2828
return errors.New("Must specify a number greater than 0")
2929
}
3030
return nil

0 commit comments

Comments
 (0)