caarlos0 / env

A simple, zero-dependencies library to parse environment variables into structs

Home Page:https://pkg.go.dev/github.com/caarlos0/env/v11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New feature: custom method to fetch env

emilien-puget opened this issue · comments

Hello, would you be interested in having a way to register a function to fetch a value from somewhere

i imagine this with the ability to have an option to change the method now called getOr, with the current implementation being the default one.

My present use case is to fetch informations from a vault-like external service

hey, @emilien-puget , thanks for the suggestion, but I really like to keep the lib simple, so, rather not add this unless we really, really need to.