mirror of
https://github.com/taigrr/jety.git
synced 2026-04-01 19:08:58 -07:00
optimistic writeback and pessimistic read
This commit is contained in:
7
jety.go
7
jety.go
@@ -28,6 +28,7 @@ type (
|
||||
|
||||
ConfigManager struct {
|
||||
configName string
|
||||
configPath string
|
||||
configFileUsed string
|
||||
configType configType
|
||||
envPrefix string
|
||||
@@ -201,6 +202,12 @@ func readFile(filename string, fileType configType) (map[string]any, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ConfigManager) SetConfigDir(path string) {
|
||||
c.mutex.Lock()
|
||||
defer c.mutex.Unlock()
|
||||
c.configPath = name
|
||||
}
|
||||
|
||||
func (c *ConfigManager) SetConfigName(name string) {
|
||||
c.mutex.Lock()
|
||||
defer c.mutex.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user