diff options
author | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2015-12-10 18:39:03 +0100 |
---|---|---|
committer | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2015-12-10 18:39:03 +0100 |
commit | 058a7ab3475728df50656699387b985b3a2537ed (patch) | |
tree | 9ef288011fb89734bb8509012624eea5badea884 /cursor_test.go | |
parent | Merge pull request #467 from boltdb/readme-coalescer (diff) | |
download | dedo-058a7ab3475728df50656699387b985b3a2537ed.tar.gz dedo-058a7ab3475728df50656699387b985b3a2537ed.tar.xz |
Make bolt.Open return the documented errors
- ErrInvalid is returned when a data file is not a Bolt-formatted
database.
- ErrVersionMismatch is returned when the data file was created with a
different version of Bolt.
- ErrChecksum is returned when either meta page checksum does not match.
Also:
- Do not wrap errors from os.Stat, so that a caller could handle os.Stat
errors just like it can handle errors from os.Open that bolt.Open
might return.
- Name tests consistently, following the pattern "TestOpen_*".
- Remove deferred calls to `os.Remove(path)`.
The calls are not only unnecessary, but also in all cases `os.Remove`
returns an error that is ignored. All those calls are meant to remove
a file that was already removed by `tmpfile()`.
- Combine "bad path" tests and use filepath.Join to build the path.
Diffstat (limited to 'cursor_test.go')
0 files changed, 0 insertions, 0 deletions