Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi authored Aug 20, 2021
1 parent 81f05d8 commit 73cf587
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ err = dotenv.Load(f, &c)
// Use `c` struct in your app!
```

### Usage Tips
* The `Load()` function gets a pointer of a struct.
* It ignores the fields that have no related environment variables in the file.
* It supports nested structs and struct pointers.

### Field Types
GoLobby DotEnv uses the [GoLobby Cast](https://github.com/golobby/cast) package to cast environment variables to related struct field types.
Here you can see the supported types:

https://github.com/golobby/cast#supported-types

## See Also
* [GoLobby/Config](https://github.com/golobby/config):
A lightweight yet powerful config package for Go projects
Expand Down

0 comments on commit 73cf587

Please sign in to comment.