flagutil

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetFlagsFromEnv

func SetFlagsFromEnv(fs *flag.FlagSet, prefix string) (err error)

SetFlagsFromEnv parses all registered flags in the given flagset, and if they are not already set it attempts to set their values from environment variables. Environment variables take the name of the flag but are UPPERCASE, and any dashes are replaced by underscores. Environment variables additionally are prefixed by the given string followed by and underscore. For example, if prefix=PREFIX: some-flag => PREFIX_SOME_FLAG

Types

This section is empty.

Jump to

Keyboard shortcuts

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