env icon indicating copy to clipboard operation
env copied to clipboard

support for suffix

Open cojua8 opened this issue 5 months ago • 0 comments

Hi!, thank you for your amazing work.

I have a use case where I need some variables to have the country iso as a suffix. For example:

THIRDPARTY_API_KEY_US
THIRDPARTY_API_SECRET_US
THIRDPARTY_API_KEY_MX
THIRDPARTY_API_SECRET_MX

The prefix option would be nice for cutting THIRDPARTY so it would be nice to have a suffix option for the country iso, so that I can write the struct just like

type ApiCredentials struct {
    ApiKey    string "env:API_KEY"
    ApiSecret string "env:API_SECRET"

and then in the parsing stage, use prefix and suffix.

I think it would be a good addition to the library. Or is there a nice way to do this with the current tools?

cojua8 avatar Nov 25 '25 13:11 cojua8