cfg

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 5 Imported by: 0

README

Go Simple Configuration

...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfig

func CreateConfig(options *Options, properties []*Property) (*viper.Viper, *pflag.FlagSet, error)

CreateConfig func

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options type

func NewOptions

func NewOptions() *Options

NewOptions func

func (*Options) UseEnv

func (o *Options) UseEnv(prefix string) *Options

UseEnv func

func (*Options) UseFile

func (o *Options) UseFile(propertyKey string) *Options

UseFile func

func (*Options) UseFlags

func (o *Options) UseFlags() *Options

UseFlags func

type Property

type Property struct {
	// contains filtered or unexported fields
}

Property type

func NewProperty

func NewProperty(key string, defaultValue interface{}) *Property

NewProperty func

func (*Property) UseEnv

func (p *Property) UseEnv() *Property

UseEnv func

func (*Property) UseFlag

func (p *Property) UseFlag(usage string, shorthand string) *Property

UseFlag func

Jump to

Keyboard shortcuts

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