cfgutil

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: ISC, ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(

	filePath string) (bool, error)

FileExists reports whether the named file or directory exists.

func NormalizeAddress

func NormalizeAddress(

	addr string, defaultPort string) (hostport string, err error)

is not valid.

func NormalizeAddresses

func NormalizeAddresses(

	addrs []string, defaultPort string) ([]string, error)

normalized with the given default port, and all duplicates removed.

Types

type AmountFlag

type AmountFlag struct {
	util.Amount
}

func NewAmountFlag

func NewAmountFlag(

	defaultValue util.Amount) *AmountFlag

NewAmountFlag creates an AmountFlag with a default util.Amount.

func (*AmountFlag) MarshalFlag

func (a *AmountFlag) MarshalFlag() (string, error)

MarshalFlag satisifes the flags.Marshaler interface.

func (*AmountFlag) UnmarshalFlag

func (a *AmountFlag) UnmarshalFlag(value string) error

UnmarshalFlag satisifes the flags.Unmarshaler interface.

type ExplicitString

type ExplicitString struct {
	Value string
	// contains filtered or unexported fields
}

func NewExplicitString

func NewExplicitString(

	defaultValue string) *ExplicitString

NewExplicitString creates a string flag with the provided default value.

func (*ExplicitString) ExplicitlySet

func (e *ExplicitString) ExplicitlySet() bool

ExplicitlySet returns whether the flag was explicitly set through the flags.Unmarshaler interface.

func (*ExplicitString) MarshalFlag

func (e *ExplicitString) MarshalFlag() (string, error)

MarshalFlag implements the flags.Marshaler interface.

func (*ExplicitString) UnmarshalFlag

func (e *ExplicitString) UnmarshalFlag(value string) error

UnmarshalFlag implements the flags.Unmarshaler interface.

Jump to

Keyboard shortcuts

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