Use ioutil.TempDir to create temporary directory (#123)

Rather than hand coding the temporary directory creation logic, use ioutil.TempDir with its own (seeded) random number generator independent of the math/rand default PRNG, so it doesn't suffer from trying a predictable and limited sequence of temporary directory names.

Fixes #45.
1 file changed
tree: f76f64343708471702d84cd5a8c44535df61557b
  1. .gitignore
  2. .travis.yml
  3. benchmark.go
  4. benchmark_test.go
  5. bootstrap_test.go
  6. check.go
  7. check_test.go
  8. checkers.go
  9. checkers_test.go
  10. export_test.go
  11. fixture_test.go
  12. foundation_test.go
  13. helpers.go
  14. helpers_test.go
  15. integration_test.go
  16. LICENSE
  17. printer.go
  18. printer_test.go
  19. README.md
  20. reporter.go
  21. reporter_test.go
  22. run.go
  23. run_test.go
  24. TODO
README.md

Instructions

Install the package with:

go get gopkg.in/check.v1

Import it with:

import "gopkg.in/check.v1"

and use check as the package name inside the code.

For more details, visit the project page:

and the API documentation: