Skip to content

Commit

Permalink
few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalabuy948 committed Aug 22, 2020
1 parent 82bac4b commit 37ed4f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
MongoUrl string `genv:"MONGO_URL,mongodb://localhost:27017"`
}
```
- `Load` will load dotenv file. You can provide file name via argument otherwise it will load dot enviroment file by priority list. First exist - first load.
Priority list:
- `Load` will load dotenv file. You can provide file name via argument otherwise it will load dot environment file by priority list.
First found - first load. Priority list:
```sh
.env.production.local`
.env.test.local`
.env.development.local`
.env.production`
.env.test`
.env.development`
.env.local`
.env`
.env.production.local
.env.test.local
.env.development.local
.env.production
.env.test
.env.development
.env.local !!! will override existing values.
.env
```

[example](examples/simple.go)
Expand Down
1 change: 1 addition & 0 deletions gonvutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func Load(filenames ...string) error {
}
filenames = append(filenames, envFileName)
}
filenames = append(filenames, ".env.local")
for _, filename := range filenames {
envMap, err := parseDotEnvFile(filename)
if err != nil {
Expand Down

0 comments on commit 37ed4f5

Please sign in to comment.