If I declare constants as the following I get the error 'const initializer in os.Getenv("MY_SECRET") is not a constant'. Why is this?
New to Go and I see the return type of Getenv is a string, but I don't understand why this wouldn't work as a constant.
const (
secret = os.Getenv("MY_SECRET")
key = os.Getenv("MY_KEY")
)