2 Commits

Author SHA1 Message Date
59b8a9078f fix config => jety 2023-11-03 17:22:02 -07:00
550537be3b setting using default vkey 2023-11-03 16:39:30 -07:00
4 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
package config package jety
import "time" import "time"

View File

@@ -1,4 +1,4 @@
package config package jety
import ( import (
"fmt" "fmt"

View File

@@ -1,4 +1,4 @@
package config package jety
import ( import (
"encoding/json" "encoding/json"

View File

@@ -1,4 +1,4 @@
package config package jety
import ( import (
"strings" "strings"
@@ -35,8 +35,8 @@ func (c *ConfigManager) SetDefault(key string, value any) {
c.defaultConfig[lower] = ConfigMap{Key: key, Value: value} c.defaultConfig[lower] = ConfigMap{Key: key, Value: value}
if _, ok := c.mapConfig[lower]; !ok { if _, ok := c.mapConfig[lower]; !ok {
if envVal, ok := c.envConfig[lower]; ok { if envVal, ok := c.envConfig[lower]; ok {
c.mapConfig[lower] = envVal c.mapConfig[lower] = ConfigMap{Key: key, Value: envVal.Value}
c.combinedConfig[lower] = envVal c.combinedConfig[lower] = ConfigMap{Key: key, Value: envVal.Value}
} else { } else {
c.combinedConfig[lower] = ConfigMap{Key: key, Value: value} c.combinedConfig[lower] = ConfigMap{Key: key, Value: value}
} }