aboutsummaryrefslogtreecommitdiff
path: root/bolt.go
blob: bb5a2dee6118161b37d14fc6e0a10bb6cf8f3a0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package bolt

import (
	"os"
)

// Open creates and opens a database at the given path.
// If the file does not exist then it will be created automatically.
func Open(path string, mode os.FileMode) (*DB, error) {
	db := &DB{}
	if err := db.Open(path, mode); err != nil {
		return nil, err
	}
	return db, nil
}