Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
antelman107 authored Jul 1, 2020
1 parent bb47f05 commit 9f0b824
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type Config struct {

func main() {
var cfg Config
if err := jsonEnvGo.DecodeConfigFromEnv(envName, &cfg); err != nil {
if err := jsonEnvGo.DecodeConfigFromEnv("CONFIG", &cfg); err != nil {
logger.Error(err)
return
}
Expand All @@ -70,4 +70,6 @@ func main() {
}
```

This package is very tiny, it can be used instead of viper (https://github.com/spf13/viper) when working especially with json configs coming from environment variables.


0 comments on commit 9f0b824

Please sign in to comment.