Skip to content

Commit

Permalink
Merge pull request #5 from hermanschaaf/patch-1
Browse files Browse the repository at this point in the history
Fix example code that panics on wrong error value
  • Loading branch information
paulmach committed Dec 8, 2018
2 parents 4dc822c + d3b0332 commit 2119033
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -84,9 +84,10 @@ Example usage:
o := scanner.Object()
// do something
}

if scanner.Err() != nil {
panic(err)

scanErr := scanner.Err()
if scanErr != nil {
panic(scanErr)
}

**Note:** Scanners are **not** safe for parallel use. One should feed the
Expand Down

0 comments on commit 2119033

Please sign in to comment.