Skip to content

Commit 5c76d3e

Browse files
authored
Add punctuation to please godoc (#197)
Fixes issue reported over at golang/go#55888
1 parent 85a2237 commit 5c76d3e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: godotenv.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const doubleQuoteSpecialChars = "\\\n\r\"!$`"
3030

3131
// Load will read your env file(s) and load them into ENV for this process.
3232
//
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).
3434
//
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.
3636
//
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:
3838
//
3939
// godotenv.Load("fileone", "filetwo")
4040
//
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.
4242
func Load(filenames ...string) (err error) {
4343
filenames = filenamesOrDefault(filenames)
4444

@@ -53,11 +53,11 @@ func Load(filenames ...string) (err error) {
5353

5454
// Overload will read your env file(s) and load them into ENV for this process.
5555
//
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).
5757
//
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.
5959
//
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:
6161
//
6262
// godotenv.Overload("fileone", "filetwo")
6363
//
@@ -124,15 +124,15 @@ func Parse(r io.Reader) (envMap map[string]string, err error) {
124124
return
125125
}
126126

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.
128128
func Unmarshal(str string) (envMap map[string]string, err error) {
129129
return Parse(strings.NewReader(str))
130130
}
131131

132132
// Exec loads env vars from the specified filenames (empty map falls back to default)
133133
// then executes the cmd specified.
134134
//
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().
136136
//
137137
// If you want more fine grained control over your command it's recommended
138138
// 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 {
146146
return command.Run()
147147
}
148148

149-
// Write serializes the given environment and writes it to a file
149+
// Write serializes the given environment and writes it to a file.
150150
func Write(envMap map[string]string, filename string) error {
151151
content, err := Marshal(envMap)
152152
if err != nil {

0 commit comments

Comments
 (0)