Skip to content

Commit

Permalink
Fix #139: Add example of excluding a call to a vendored dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Kaplan authored and jdkaplan committed Jun 15, 2020
1 parent 1618cdc commit e327f15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ An example of an exclude file is:
The exclude list is combined with an internal list for functions in the Go standard library that
have an error return type but are documented to never return an error.

When using vendored dependencies, specify the full import path. For example:
* Your project's import path is `example.com/yourpkg`
* You've vendored `example.net/fmt2` as `vendor/example.net/fmt2`
* You want to exclude `fmt2.Println` from error checking

In this case, add this line to your exclude file:
```
example.com/yourpkg/vendor/example.net/fmt2.Println
```


### The deprecated method

Expand Down

0 comments on commit e327f15

Please sign in to comment.