@@ -30,15 +30,15 @@ const doubleQuoteSpecialChars = "\\\n\r\"!$`"
30
30
31
31
// Load will read your env file(s) and load them into ENV for this process.
32
32
//
33
- // Call this function as close as possible to the start of your program (ideally in main)
33
+ // Call this function as close as possible to the start of your program (ideally in main).
34
34
//
35
- // If you call Load without any args it will default to loading .env in the current path
35
+ // If you call Load without any args it will default to loading .env in the current path.
36
36
//
37
- // You can otherwise tell it which files to load (there can be more than one) like
37
+ // You can otherwise tell it which files to load (there can be more than one) like:
38
38
//
39
39
// godotenv.Load("fileone", "filetwo")
40
40
//
41
- // It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults
41
+ // It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults.
42
42
func Load (filenames ... string ) (err error ) {
43
43
filenames = filenamesOrDefault (filenames )
44
44
@@ -53,11 +53,11 @@ func Load(filenames ...string) (err error) {
53
53
54
54
// Overload will read your env file(s) and load them into ENV for this process.
55
55
//
56
- // Call this function as close as possible to the start of your program (ideally in main)
56
+ // Call this function as close as possible to the start of your program (ideally in main).
57
57
//
58
- // If you call Overload without any args it will default to loading .env in the current path
58
+ // If you call Overload without any args it will default to loading .env in the current path.
59
59
//
60
- // You can otherwise tell it which files to load (there can be more than one) like
60
+ // You can otherwise tell it which files to load (there can be more than one) like:
61
61
//
62
62
// godotenv.Overload("fileone", "filetwo")
63
63
//
@@ -124,15 +124,15 @@ func Parse(r io.Reader) (envMap map[string]string, err error) {
124
124
return
125
125
}
126
126
127
- //Unmarshal reads an env file from a string, returning a map of keys and values.
127
+ // Unmarshal reads an env file from a string, returning a map of keys and values.
128
128
func Unmarshal (str string ) (envMap map [string ]string , err error ) {
129
129
return Parse (strings .NewReader (str ))
130
130
}
131
131
132
132
// Exec loads env vars from the specified filenames (empty map falls back to default)
133
133
// then executes the cmd specified.
134
134
//
135
- // Simply hooks up os.Stdin/err/out to the command and calls Run()
135
+ // Simply hooks up os.Stdin/err/out to the command and calls Run().
136
136
//
137
137
// If you want more fine grained control over your command it's recommended
138
138
// that you use `Load()` or `Read()` and the `os/exec` package yourself.
@@ -146,7 +146,7 @@ func Exec(filenames []string, cmd string, cmdArgs []string) error {
146
146
return command .Run ()
147
147
}
148
148
149
- // Write serializes the given environment and writes it to a file
149
+ // Write serializes the given environment and writes it to a file.
150
150
func Write (envMap map [string ]string , filename string ) error {
151
151
content , err := Marshal (envMap )
152
152
if err != nil {
0 commit comments