flag

package
v0.0.0-...-382bf78 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncludeUnset

func IncludeUnset(b bool) source.Option

IncludeUnset toggles the loading of unset flags and their respective default values. Default behavior is to ignore any unset flags.

func NewSource

func NewSource(opts ...source.Option) source.Source

NewSource returns a config source for integrating parsed flags. Hyphens are delimiters for nesting, and all keys are lowercased.

Example:

dbhost := flag.String("database-host", "localhost", "the db host name")

{
    "database": {
        "host": "localhost"
    }
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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