Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.
This repository was archived by the owner on May 26, 2023. It is now read-only.

prefix for environment variables #23

@cmorent

Description

@cmorent

It would be great to have a function like "SetEnvPrefix" or something to be able to add a prefix to the environment variables. As an example:

var age int

flag.IntVar(&age, "age", 27, "my age")
flag.SetEnvPrefix("svc")

And then be able to do the following:

$ SVC_AGE=25 go run gopher.go

What do you think ?

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