assert: Fix NilError, error non-nil type

The previous fix incorrectly reported non-nil types as nil errors.
Instead this commit handles the case by using a different error message.
2 files changed
tree: de118288ccbdb0b66dd9b1c6ee765e6437721711
  1. .circleci/
  2. .codecov.yml
  3. .gitignore
  4. .golangci.yml
  6. Dockerfile
  7. Gopkg.toml
  10. appveyor.yml
  11. assert/
  12. dobi.yaml
  13. env/
  14. fs/
  15. go.mod
  16. go.sum
  17. golden/
  18. icmd/
  19. internal/
  20. pkg.go
  21. poll/
  22. scripts/
  23. skip/
  24. x/

A collection of packages to augment testing and support common patterns.

GoDoc CircleCI Go Reportcard


With Go modules enabled (go1.11+)

$ go get
import ""

To use with an older version of Go that does not understand Go module paths pin to version v2.3.0.


  • assert - compare values and fail the test when a comparison fails
  • env - test code which uses environment variables
  • fs - create temporary files and compare a filesystem tree to an expected value
  • golden - compare large multi-line strings against values frozen in golden files
  • icmd - execute binaries and test the output
  • poll - test asynchronous code by polling until a desired state is reached
  • skip - skip a test and print the source code of the condition used to skip the test