Use viper to handle ENV variables in config #1398

Open
opened 2025-12-28 17:22:51 +00:00 by sami · 0 comments
Owner

Originally created by @End-rey on GitHub (Apr 11, 2025).

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.

Originally created by @End-rey on GitHub (Apr 11, 2025). ## 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#1398
No description provided.