go-micro: github.com/micro/go-micro/config/source/flag Index | Files

package flag

import "github.com/micro/go-micro/config/source/flag"

Index

Package Files

flag.go options.go

func IncludeUnset Uses

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 Uses

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"
    }
}

Package flag imports 7 packages (graph). Updated 2020-02-08. Refresh now. Tools for package owners.