Skip to content

Commit

Permalink
fix(): return scanner.Err() instead of nil (#3)
Browse files Browse the repository at this point in the history
The code description in the book does not match the example in github.
  • Loading branch information
zombieleet authored Nov 16, 2023
1 parent 6a9ad11 commit c818e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sum/sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func Sum5(fileName string) (ret int64, err error) {

ret += num
}
return ret, nil
return ret, scanner.Err()
}

func Sum5_line(fileName string) (ret int64, err error) {
Expand Down

0 comments on commit c818e6f

Please sign in to comment.