do not call sync once just after init
This commit is contained in:
@@ -15,7 +15,7 @@ const (
|
||||
defaultMainDir = "./store"
|
||||
)
|
||||
|
||||
var env = sync.OnceValue[environment](newEnv)()
|
||||
var env = sync.OnceValue[environment](newEnv)
|
||||
|
||||
type environment struct {
|
||||
adminUsername string
|
||||
@@ -77,5 +77,5 @@ func newEnv() environment {
|
||||
}
|
||||
|
||||
func GetEnv() environment {
|
||||
return env
|
||||
return env()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user