Skip to content

Update godotenv to v1.5.1 for multiline env variables support #162

New issue

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add support for multiline env variables
  • Loading branch information
aponad committed Jun 16, 2025
commit 64f5798c00e02d0752daaee710284c2f62b3ae00
7 changes: 7 additions & 0 deletions aconfigdotenv/dotenv_test.go
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ func TestDotEnv(t *testing.T) {
M: "n",
},
MI: "q,w",
ML: "this\nis\na multiline\n",
}

if got := cfg; !reflect.DeepEqual(want, got) {
@@ -127,6 +128,7 @@ type structConfig struct {
AA structA `env:"A"`
StructM
MI interface{} `env:"MI"`
ML string `env:"ML"`
}

type structY struct {
@@ -174,4 +176,9 @@ A_B_D=x,y,z
M=n
MI=q,w
ML='this
is
a multiline
'
`
4 changes: 2 additions & 2 deletions aconfigdotenv/go.mod
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@ module github.com/cristalhq/aconfig/aconfigdotenv
go 1.16

require (
github.com/cristalhq/aconfig v0.17.0
github.com/joho/godotenv v1.4.0
github.com/cristalhq/aconfig v0.18.7
github.com/joho/godotenv v1.5.1
)
6 changes: 6 additions & 0 deletions aconfigdotenv/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
github.com/cristalhq/aconfig v0.17.0 h1:VYqg0YOM5yUEx0KH/VwUYF2e/PNI7dcUE66y+xEx73s=
github.com/cristalhq/aconfig v0.17.0/go.mod h1:NXaRp+1e6bkO4dJn+wZ71xyaihMDYPtCSvEhMTm/H3E=
github.com/cristalhq/aconfig v0.18.7 h1:ZvgaiSz7D3++TrXN9DrTSWA71eFuig0HhBY32nblLOk=
github.com/cristalhq/aconfig v0.18.7/go.mod h1:9ogrGEt9yU5V4pif/ThkVUfhj8JkdV+iDeahZGgfnDU=
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=