Dan Anglin
5189ebe7bb
Remove the original 'Write' function from the db package and rename the 'WriteMany' function to 'Write' as it can already write one or many Bolt items to the database. Also update the test suites and add more coverage in the board package.
17 lines
304 B
Go
17 lines
304 B
Go
package db
|
|
|
|
import "fmt"
|
|
|
|
type bucketNotExistError struct {
|
|
bucket string
|
|
}
|
|
|
|
func (e bucketNotExistError) Error() string {
|
|
return fmt.Sprintf("bucket %s does not exist", e.bucket)
|
|
}
|
|
|
|
type itemListEmptyError struct{}
|
|
|
|
func (e itemListEmptyError) Error() string {
|
|
return "the list of items is empty."
|
|
}
|