diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-29 14:28:53 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-29 14:28:53 -0600 |
commit | fcce87626ceeb4e9477b915f89aa0e9e3add5860 (patch) | |
tree | d8381077fb0d78b86219491d5331589cf470042a /bolt.go | |
parent | Merge pull request #97 from benbjohnson/cli (diff) | |
parent | Add DB.Check(). (diff) | |
download | dedo-fcce87626ceeb4e9477b915f89aa0e9e3add5860.tar.gz dedo-fcce87626ceeb4e9477b915f89aa0e9e3add5860.tar.xz |
Merge pull request #98 from benbjohnson/fsck
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 { |