do not call sync once just after init

This commit is contained in:
rmanach
2025-01-06 10:58:05 +01:00
parent ae27d07170
commit 7d1a042915
2 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -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()
}