parameter

package
v0.0.0-...-fa26ab0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0, BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFile

func LoadConfigFile(config *viper.Viper, configDir string, configName string, bindFlagSet *flag.FlagSet, loadDefault bool, dontParseFlags ...bool) error

LoadConfigFile fetches config values from a dir defined in "configDir" (or the current working dir if not set) into a given viper instance.

It automatically reads in a single config with name defined in "configName" and ending with: .json, .toml, .yaml or .yml (in this sequence) or the file extension in configName if available.

func PrintConfig

func PrintConfig(config *viper.Viper, ignoreSettingsAtPrint ...[]string)

PrintConfig prints the actual configuration, ignoreSettingsAtPrint are not shown

Types

type BoolParameter

type BoolParameter struct {
	Name         string
	Value        *bool
	DefaultValue bool
	Description  string
}

type IntParameter

type IntParameter struct {
	Name         string
	Value        *int
	DefaultValue int
	Description  string
}

type IntParameterConsumer

type IntParameterConsumer = func(param *IntParameter)

type StringParameter

type StringParameter struct {
	Name         string
	Value        *string
	DefaultValue string
	Description  string
}

type StringParameterConsumer

type StringParameterConsumer = func(param *StringParameter)

Jump to

Keyboard shortcuts

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