Compare commits

..

12 Commits

Author SHA1 Message Date
John Barton 1e1ed32207 Test against go 1.19 too 2023-01-27 13:07:07 +11:00
John Barton d4cc462af7 Fix up some lint/staticcheck recommendations 2023-01-27 13:06:52 +11:00
John Barton 02a6516148 Add a full fixture for comments for extra piece of mind 2023-01-27 13:00:16 +11:00
John Barton 08d75deb23 Fix up bad merge 2023-01-27 12:55:00 +11:00
John Barton c723940cb5 Merge branch 'main' into multiline-string-support 2023-01-27 12:03:06 +11:00
John Barton 687a37d9c9 Update parser.go
Co-authored-by: Austin Sasko <austintyler0239@yahoo.com>
2023-01-27 12:00:11 +11:00
John Barton a4061f306a When tests fail, show source version of string (inc special chars) 2021-09-24 20:58:07 +10:00
John Barton 22f9782344 Switch to GOINSECURE for power8 CI task 2021-09-24 20:44:43 +10:00
John Barton 2f66a86dc9 Update go versions to test against 2021-09-24 20:38:24 +10:00
John Barton 77e8b7d7d6 Expand fixture tests to include multiline strings 2021-09-24 20:33:25 +10:00
x1unix dd57617d18 Add multi-line var values test case and update comment test
Signed-off-by: x1unix <denis0051@gmail.com>
2021-09-24 17:21:42 +10:00
x1unix 15b4dd39bb refactor dotenv parser in order to support multi-line variable values declaration
Signed-off-by: x1unix <denis0051@gmail.com>
2021-09-24 17:21:42 +10:00
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: [ '1.20', '1.19', '1.18', '1.17', '1.16' ]
go: [ '1.19', '1.18', '1.17', '1.16', '1.15' ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
name: ${{ matrix.os }} Go ${{ matrix.go }} Tests
steps:
+2 -2
View File
@@ -75,8 +75,8 @@ import _ "github.com/joho/godotenv/autoload"
While `.env` in the project root is the default, you don't have to be constrained, both examples below are 100% legit
```go
godotenv.Load("somerandomfile")
godotenv.Load("filenumberone.env", "filenumbertwo.env")
_ = godotenv.Load("somerandomfile")
_ = godotenv.Load("filenumberone.env", "filenumbertwo.env")
```
If you want to be really fancy with your env file you can do comments and exports (below is a valid env file)
+1
View File
@@ -1 +1,2 @@
export OPTION_A='postgres://localhost:5432/database?sslmode=disable'