util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigFromFlags

func DefaultConfigFromFlags(cfg interface{}) interface{}

DefaultConfigFromFlags will load default values into cfg by retrieving default values that are registered as flags.

cfg must implement either PrefixedConfigFlags or ConfigFlags.

Types

type ConfigFlags

type ConfigFlags interface {
	RegisterFlags(f *flag.FlagSet)
}

ConfigFlags is an interface that will register flags that can control some object.

type PrefixedConfigFlags

type PrefixedConfigFlags interface {
	RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
}

PrefixedConfigFlags is an interface that, given a prefix for flags and a flagset, will register flags that can control some object.

Jump to

Keyboard shortcuts

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