fix: added the init fuction in install_main.go

This commit is contained in:
maishivamhoo123
2026-01-08 00:12:56 +05:30
committed by LinkinStars
parent f6d30a5b57
commit 3d5465334c
+8 -1
View File
@@ -25,13 +25,20 @@ import (
"github.com/apache/answer/internal/base/path"
"github.com/apache/answer/internal/base/translator"
"github.com/joho/godotenv"
)
var (
port = os.Getenv("INSTALL_PORT")
port string
confPath = ""
)
func init() {
_ = godotenv.Load()
port = os.Getenv("INSTALL_PORT")
}
func Run(configPath string) {
confPath = configPath
// initialize translator for return internationalization error when installing.