Commit Graph

33 Commits (9d9ddadf44b4c17c42bafdc530ddeee1927c067d)

Author SHA1 Message Date
Paul Annesley ebf1036af6 Parse(io.Reader) => map[string]string 2017-08-06 17:34:10 +10: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
John Barton (joho) 74ec3a085f Handle quoted hashes "properly"
Read: not prettily or robustly.
2013-07-31 12:24:03 +10:00
John Barton (joho) aa6e870b57 Red, green, rinse repeat. 2013-07-31 12:10:31 +10:00
John Barton (joho) 98b43188a1 World's most naive comment parser...
Really pushing this red/green/refactor thing a little bit too far.
2013-07-31 12:08:58 +10:00
John Barton (joho) a37b438d54 Start trying to do comments/quoting properly. 2013-07-31 11:48:10 +10:00
John Barton (joho) 37c8b8e487 export keyword parsing 2013-07-30 18:38:10 +10:00
John Barton (joho) 4a2748eb3c Yaml style bro. 2013-07-30 18:34:51 +10:00
John Barton (joho) b10c02f9b0 Move the red-green a little way down the existing parser specs. 2013-07-30 18:23:33 +10:00
John Barton (joho) 973cf53008 Get the basic tests green. 2013-07-30 17:44:28 +10:00
John Barton (joho) 78ba83b776 First failing tests extracted from dotenv 2013-07-30 11:46:52 +10:00