Skip to content

Commit

Permalink
revert: add prefix for koanf into the readme again
Browse files Browse the repository at this point in the history
  • Loading branch information
Parham Alvani committed Dec 27, 2023
1 parent 2b5c690 commit cdabba3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ cfg := koanf.Provide("testing", Config{
```

You can pass the default values by passing an instance of the `Config` and fill it with default values.
Use `__` in the environment variables to replace `.`, for example use `RABBITMQ__SERVICE` to reference `Config.RabbitMQ.Service`.
Environment variables should be prefixed by service name to be considered. For example for the `testing`
service you need to use `TESTING_RABBITMQ__SERVICE` to reference `Config.RabbitMQ.Service`.

Please note that to use `koanf` you need to tag your structure by `koanf` and set the name for configuration
as follows:
Expand Down

0 comments on commit cdabba3

Please sign in to comment.