I'm trying to set some environment variables on my machine using Go OS
err := os.Setenv("DBHOST", dbHostLocal)
if err != nil {
log.Fatalf("err %v", err)
}
It seems the variable is available to the Go program but once I quite / terminate the Go process the variable is no longer available. I'm wondering if it's possible to set these variables permanently. The reason is that i was looking to create a "setup" file with config files ( db name etc ) for the local and dev environment so that I could switch between without any setup at all... just one time go run setup.go.