I deployed a Web service using Go, I’ve set the environment variables needed but my deployment keeps failing due to err from not reading env variables, P.S: the code works fine locally and is able to local envrionment varialbes.
I calll this function in my main.go, I cross-checked everything and couldn’t find an help…
func LoadEnv(){
err := godotenv.Load()
if err != nil{
log.Fatal("failed to load environment variables")
}
}