Thanks to visit codestin.com
Credit goes to github.com

Skip to content

support for suffix #394

@cojua8

Description

@cojua8

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions