Commit Graph

59 Commits (5c76d3e02c63f90a1bfae60738bbc24ba16f05c4)

Author SHA1 Message Date
John Barton 5c76d3e02c
Add punctuation to please godoc (#197)
Fixes issue reported over at https://github.com/golang/go/issues/55888
2022-10-30 12:38:35 +11:00
Oleksandr Redko e74c6cadd5
Fix typos in comments and extend README (#177) 2022-04-25 14:35:55 +10:00
Alexander Klein ddf83eb33b
Add missing newline to created env files (#133) 2021-03-04 20:35:31 +11:00
Andre Soares fccdfd265d Fix package name 2020-06-26 15:39:06 -03:00
Andre Soares 63ea8bf09b Change package name back to joho/godotenv 2020-06-26 15:35:47 -03:00
Andre Soares 29b5be9cdc Rename and implement int-able without quotes 2020-06-26 15:22:04 -03:00
orxobo dbcf4b53b8
Fixed Write bugs
This should address a fix #93 and #94
This has not been addressed in any tests.
2020-02-11 17:05:34 +10:00
Dustin H 992ab0ec47
#89 move regexp.MustCompile to globals 2019-10-18 10:35:15 -04:00
John Barton 61baafa627
Merge branch 'master' into ignore-leading-whitespace 2019-02-04 15:28:23 +11:00
Dave Henderson 263a1dda9d
Support key names beginning with 'export'
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2019-02-03 23:11:51 -05:00
Dave Henderson 79711eebaf
Ignoring leading whitespace
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2019-02-03 22:39:38 -05:00
Lucas Tétreault 2d8b3aab88 feat(Expand Variables): Custom variable expansion instead of Go's os.Expand
Copy over the tests from https://github.com/bkeepers/dotenv/blob/master/spec/dotenv/parser_spec.rb
related to expanding variables and implement the required changes. I also realized as part of this
that this implementation was not handling values in single quotes properly (e.g.: not the same was
as the ruby package mentionned) so that has been fixed as well along with the related tests.

Fixes: #52
2018-09-11 00:55:10 -06:00
egorse 8ad714e304 The value expand fallback to actual ENV values 2018-03-31 23:18:36 +03:00
Takumasa Sakao 50c29652a0 Expand variables on parseValue 2017-11-20 23:20:38 +09:00
Takumasa Sakao 9be76b3741 Pass envMap to parseLine & parseValue 2017-11-20 22:21:39 +09:00
Alex Quick 3dd2dbe832 sort output of Write/Marshal 2017-09-16 18:02:27 -04:00
Alex Quick b1bb9d9fc3 rename WriteString/ReadString to Marshal/Unmarshal 2017-09-14 00:24:22 -04:00
Alex Quick 5d289f4405 escape some other bash-y special chars ($!) 2017-09-13 23:13:08 -04:00
Alex Quick 88e7c8bd35 support for writing envs out in dotenv format 2017-09-13 23:13:08 -04:00
John Barton c9360df4d1 Merge pull request #34 from alexquick/fix-parsing-issues
Fix some small parsing bugs
2017-08-22 14:21:26 +10:00
John Barton 59f20222da Merge pull request #33 from crash7/go-report-card
Add Go Report Card badge and fix spelling error
2017-08-22 14:17:51 +10:00
Paul Annesley ebf1036af6 Parse(io.Reader) => map[string]string 2017-08-06 17:34:10 +10:00
Alex Quick a905e99577 fix panic with `"` as the value 2017-07-16 18:43:49 -04:00
Alex Quick 6f30f0c011 support for equals in yaml-style lines 2017-07-16 17:25:28 -04:00
Alex Quick 84bf91f40e rudimentry support for nested quotes 2017-07-16 17:24:36 -04:00
Alex Quick b9324c6f3c handle escaping more comprehensively 2017-07-16 17:15:29 -04:00
Christian Musa 12b7e03247 Add Go Report Card badge and fix spelling error 2017-07-14 21:33:04 -03:00
John Barton (joho) 034acc2190 Change check of existing env to respect empty (but set) vars. 2017-03-28 11:54:56 +11:00
Oenning a42a65518c allow empty_var 2017-03-22 13:05:44 +00:00
Matias Anaya 6a1233b2f6 Fix quoted values check 2017-03-21 19:04:19 +11:00
Martin Milata 861984c215 Don't hide line parsing errors 2016-12-12 14:43:30 +01:00
Martin Milata 0ff0c0fc7a Propagate errors encountered when reading file 2016-12-12 14:41:36 +01:00
Josh Mervine 008304c688 adding Overload method 2015-09-05 08:59:08 -07:00
John Barton (joho) f6581828bb outdent else because golint said so. 2015-03-23 12:17:14 +11:00
John Barton (joho) d29c003c20 Still trying to please golint with package comments. 2015-03-23 12:15:55 +11:00
John Barton (joho) 19b5c2bf30 Some golint feedback from http://goreportcard.com/report/joho/godotenv 2015-03-23 12:15:01 +11:00
David Calavera dc9cc93c4e Add values to the envMap when reading the file.
But do not override values in the global environment.
2014-12-23 17:57:02 -08:00
John Barton (joho) 1736a884e7 Improve godoc on Read and Exec 2014-10-12 09:58:10 +11:00
John Barton (joho) b2cd7d822b Move the env loadings & command running into main package. 2014-10-12 09:50:38 +11:00
John Barton (joho) 8350eb932e Remove commented out code and go fmt tests. 2014-07-14 19:36:35 +10:00
David Bochenski 9c77c4efaf Closes #4 Use bufio.Scanner to read newLines 2014-06-25 16:26:24 +01:00
mattn c0dce90b3c FOO=BAR= should be "FOO" = "BAR=" 2013-11-18 18:46:24 +09:00
John Barton (joho) 6e333bd708 add godotenv.Read() which returns a map rather than calling os.Setenv 2013-09-04 12:40:57 +10:00
John Barton (joho) d00d0f7ef4 Turns out there was an easier way to read the env file. 2013-08-02 13:40:38 +10:00
John Barton (joho) 42920bbe5d Write up something for "go doc" 2013-07-31 14:54:21 +10:00
John Barton (joho) 9ec71cc6c8 Make sure we don't overwrite existing ENV vars. 2013-07-31 14:25:10 +10:00
John Barton (joho) 9d9f6ccb57 Make Load() without args open .env by default 2013-07-31 13:51:59 +10:00
John Barton (joho) ac58adf673 Get the code running against all fixtures. 2013-07-31 13:39:59 +10:00
John Barton (joho) 9b4bbb98c3 Clear the env at the start of each integration test. 2013-07-31 12:57:44 +10:00
John Barton (joho) 9001b88250 Ignore comment lines and lines full o' whitespace. 2013-07-31 12:37:08 +10:00