We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
m, err := godotenv.Unmarshal("MAIL_PASSWORD=cy8$V2dABC") assert.Nil(t, err) assert.Equal(t, "cy8$V2dABC", m["MAIL_PASSWORD"])
Expected :cy8$V2dABC Actual :cy8dABC
The text was updated successfully, but these errors were encountered:
works for me if escaped $
so basically it's cy8\$V2dABC, for you
Sorry, something went wrong.
Ya, I have spent a few hours for debugging this, it cause me a lot of pain, do we have any better solution?
m, err := godotenv.Unmarshal("MAIL_PASSWORD=cy8$V2dABC") assert.Nil(t, err) assert.Equal(t, "cy8$V2dABC", m["MAIL_PASSWORD"]) Expected :cy8$V2dABC Actual :cy8dABC
You can also handle it by using single quotes. your .env file:
PASS='cy8$V2dABC'
And you can access PASS simply like this:
PASS
package main import ( "fmt" "os" _ "github.com/joho/godotenv/autoload" ) func main() { fmt.Println("PASS:", os.Getenv("PASS")) // PASS: cy8$V2dABC }
No branches or pull requests
Expected :cy8$V2dABC
Actual :cy8dABC
The text was updated successfully, but these errors were encountered: