feat: Component

This commit is contained in:
Artёm Mishin committed 2025-04-25 15:00:25 +03:00
1 parent a3ab13975a
commit e03e3e1514
4 files changed
+52 -49

No files matched your search

-12
View File
@@ -4,7 +4,6 @@ import (
"go.uber.org/zap"
"os"
"universe.mrlokop.dev/core/config"
"universe.mrlokop.dev/core/fs"
"universe.mrlokop.dev/core/modules"
)
@@ -18,17 +17,6 @@ var (
log.Sugar().Infof("Starting %s on %s, pid=%v, env=%s", info.ServiceName, hostname, os.Getpid(), env)
})
context.Provide(func(env AppEnvType) RunPath {
if env == AppEnvTypeDevelopment {
return fs.System.INodeAt("run")
}
runEnv := os.Getenv("UNIVERSE_RUN_PATH")
if runEnv == "" {
return fs.System.INodeAt(".")
}
return fs.System.INodeAt(runEnv)
})
context.Provide(func(path RunPath) StoragePath {
return path.Join("storage")
})