some tests and major cleanup

This commit is contained in:
ston1th 2018-10-19 23:08:32 +02:00
commit 16671b3406
30 changed files with 192057 additions and 202431 deletions

View file

@ -8,7 +8,10 @@ import (
"io"
)
const defaultBoltBucket = "default"
const (
defaultBoltBucket = "default"
fileMode = 0640
)
type BoltStore struct {
Marshaler
@ -19,7 +22,7 @@ func NewBoltStore(file string, m Marshaler) (bs *BoltStore, err error) {
if m == nil {
m = NewGOB()
}
db, err := bolt.Open(file, 0640, nil)
db, err := bolt.Open(file, fileMode, nil)
if err != nil {
return
}