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

package flag

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


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.


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

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

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