feat(config): restructures config

This commit is contained in:
Lewis Wynne 2025-12-18 18:20:51 +00:00
parent 65a393f8d6
commit f0be9c42d3
10 changed files with 71 additions and 59 deletions

View file

@ -174,7 +174,7 @@ func (s *Store) parseDB(v string, defaults bool) (string, error) {
}
if db == "" {
if defaults {
return config.DefaultDB, nil
return config.Store.DefaultStoreName, nil
}
return "", fmt.Errorf("cannot parse db: bad db format, use DB or @DB")
}
@ -186,7 +186,7 @@ func (s *Store) parseDB(v string, defaults bool) (string, error) {
func (s *Store) open(name string) (*badger.DB, error) {
if name == "" {
name = config.DefaultDB
name = config.Store.DefaultStoreName
}
path, err := s.path(name)
if err != nil {