diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-28 00:07:05 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-29 14:22:32 -0600 |
commit | 7f2de9f17a8c6113176ecb5a3eb6ecc0772a9ec1 (patch) | |
tree | d8381077fb0d78b86219491d5331589cf470042a /bolt.go | |
parent | Merge pull request #97 from benbjohnson/cli (diff) | |
download | dedo-7f2de9f17a8c6113176ecb5a3eb6ecc0772a9ec1.tar.gz dedo-7f2de9f17a8c6113176ecb5a3eb6ecc0772a9ec1.tar.xz |
Add DB.Check().
Diffstat (limited to 'bolt.go')
-rw-r--r-- | bolt.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -15,6 +15,14 @@ func Open(path string, mode os.FileMode) (*DB, error) { return db, nil } +// ErrorList represents a slice of errors. +type ErrorList []error + +// Error returns a readable count of the errors in the list. +func (l ErrorList) Error() string { + return fmt.Sprintf("%d errors occurred", len(l)) +} + // _assert will panic with a given formatted message if the given condition is false. func _assert(condition bool, msg string, v ...interface{}) { if !condition { |