syntax fixes

This commit is contained in:
ston1th 2021-11-05 21:55:18 +01:00
commit 1ce33aa89a
13 changed files with 45 additions and 43 deletions

View file

@ -34,7 +34,7 @@ type DB struct {
indexPath string
}
func NewPlain(cfg core.Config) (db *DB, err error) {
func NewPlain(cfg *core.Config) (db *DB, err error) {
db = &DB{admin: cfg.Admin, cache: cache.NewCache()}
dbFile := filepath.Join(cfg.DataDir, storeFile)
err = godrop.Unveil(dbFile, "rwc")
@ -45,7 +45,7 @@ func NewPlain(cfg core.Config) (db *DB, err error) {
return
}
func New(cfg core.Config) (db *DB, err error) {
func New(cfg *core.Config) (db *DB, err error) {
db, err = NewPlain(cfg)
if err != nil {
return