flagenv

package
v0.0.0-...-cd31975 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package flagenv allows setting flags from the command line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Populate

func Populate(set *flag.FlagSet, prefix string) error

Populate sets the flags in set from the environment. The environment value used will be the name of the flag in upper case, with '-' changed to '_', and (if prefixis not the empty string) prepended with prefix and an underscore. So, if prefix is "DOORMAN", and the flag's name "foo-bar", the environment variable DOORMAN_FOO_BAR will be used.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL