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

@ -59,7 +59,7 @@ func ParseKey(raw string, defaults bool) (KeySpec, error) {
key := strings.ToLower(rawKey)
db := strings.ToLower(rawDB)
if db == "" && defaults {
db = config.DefaultDB
db = config.Store.DefaultStoreName
}
return KeySpec{
@ -82,7 +82,7 @@ func (k KeySpec) Full() string {
// Display returns the normalized key reference
// but omits the default database if none was set manually
func (k KeySpec) Display() string {
if k.DB == "" || k.DB == config.DefaultDB {
if k.DB == "" || k.DB == config.Store.DefaultStoreName {
return k.Key
}
return fmt.Sprintf("%s@%s", k.Key, k.DB)