nspcc-dev / nspcc-dev/neofs-node
Use `viper` to handle ENV variables in config
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when we write our own ENV variable handler when it can be solved using the library viper.
Describe the solution you'd like
Update the viper library to the version when there is a built-in handler for ENV variables in the function UnmarshalExact and do not use your own handler.
Describe alternatives you've considered
Keep it as is, it works.
Additional context
The main feature has already been implemented https://github.com/spf13/viper/pull/1429, but now it is experimental and has some problems, for example https://github.com/spf13/viper/issues/1732.
Own handler has appeared in #3247 and #3288.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the current ENV-variable handler introduced in #3247 and #3288, then review Viper's UnmarshalExact support in PR #1429 and the limitations described in issue #1732. Done means the dependency uses a suitable Viper version and the project's own handler is no longer used without regressing configuration behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100