cfgutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2016 License: 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)

NormalizeAddress returns the normalized form of the address, adding a default port if necessary. An error is returned if the address, even without a port, is not valid.

func NormalizeAddresses

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

NormalizeAddresses returns a new slice with all the passed peer addresses normalized with the given default port, and all duplicates removed.

Types

type AmountFlag added in v0.1.0

type AmountFlag struct {
	dcrutil.Amount
}

AmountFlag embeds a dcrutil.Amount and implements the flags.Marshaler and Unmarshaler interfaces so it can be used as a config struct field.

func (*AmountFlag) MarshalFlag added in v0.1.0

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

MarshalFlag satisifes the flags.Marshaler interface.

func (*AmountFlag) UnmarshalFlag added in v0.1.0

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

UnmarshalFlag satisifes the flags.Unmarshaler interface.

Jump to

Keyboard shortcuts

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