flagutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAll

func AddAll(fs *pflag.FlagSet)

func AddConfirmations

func AddConfirmations(fs *pflag.FlagSet)

func AddFirstBlock

func AddFirstBlock(fs *pflag.FlagSet)

func AddFlags

func AddFlags(fm FlagFuncMap)

func AddForce

func AddForce(fs *pflag.FlagSet)

func AddFormat

func AddFormat(fs *pflag.FlagSet)

func AddIgnoreTarget

func AddIgnoreTarget(fs *pflag.FlagSet)

func AddInput

func AddInput(fs *pflag.FlagSet)

func AddOutput

func AddOutput(fs *pflag.FlagSet)

func AddRPC

func AddRPC(fs *pflag.FlagSet)

func AddVerbose

func AddVerbose(fs *pflag.FlagSet)

func All

func All(fs *pflag.FlagSet) (bool, error)

func Bool

func Bool(fs *pflag.FlagSet, name string) (bool, error)

func Confirmations

func Confirmations(fs *pflag.FlagSet) (uint64, error)

func Count

func Count(fs *pflag.FlagSet, name string) (int, error)

func Duration

func Duration(fs *pflag.FlagSet, name string) (time.Duration, error)

func FirstBlock

func FirstBlock(fs *pflag.FlagSet) (uint64, error)

func Force

func Force(fs *pflag.FlagSet) (bool, error)

func Format

func Format(fs *pflag.FlagSet) (string, error)

func IgnoreTarget

func IgnoreTarget(fs *pflag.FlagSet) (bool, error)

func MustAll

func MustAll(fs *pflag.FlagSet) bool

func MustBool

func MustBool(fs *pflag.FlagSet, name string) bool

func MustConfirmations

func MustConfirmations(fs *pflag.FlagSet) uint64

func MustCount

func MustCount(fs *pflag.FlagSet, name string) int

func MustDuration

func MustDuration(fs *pflag.FlagSet, name string) time.Duration

func MustFirstBlock

func MustFirstBlock(fs *pflag.FlagSet) uint64

func MustForce

func MustForce(fs *pflag.FlagSet) bool

func MustFormat

func MustFormat(fs *pflag.FlagSet) string

func MustIgnoreTarget

func MustIgnoreTarget(fs *pflag.FlagSet) bool

func MustOpenInput

func MustOpenInput(fs *pflag.FlagSet) (io.Reader, func() error)

func MustOpenOutput

func MustOpenOutput(fs *pflag.FlagSet) (io.Writer, func() error)

func MustRPCAddress

func MustRPCAddress(fs *pflag.FlagSet) string

func MustRPCPassword

func MustRPCPassword(fs *pflag.FlagSet) string

func MustRPCTLSConfig

func MustRPCTLSConfig(fs *pflag.FlagSet) *cryptocore.TLSConfig

func MustRPCUsername

func MustRPCUsername(fs *pflag.FlagSet) string

func MustString

func MustString(fs *pflag.FlagSet, name string) string

func MustUInt64

func MustUInt64(fs *pflag.FlagSet, name string) uint64

func MustVerbose

func MustVerbose(fs *pflag.FlagSet) int

func MustVerboseLevel

func MustVerboseLevel(fs *pflag.FlagSet, max int) int

func OpenInput

func OpenInput(fs *pflag.FlagSet) (io.Reader, func() error, error)

func OpenOutput

func OpenOutput(fs *pflag.FlagSet) (io.Writer, func() error, error)

func RPCAddress

func RPCAddress(fs *pflag.FlagSet) (string, error)

func RPCPassword

func RPCPassword(fs *pflag.FlagSet) (string, error)

func RPCTLSConfig

func RPCTLSConfig(fs *pflag.FlagSet) (*cryptocore.TLSConfig, error)

func RPCUsername

func RPCUsername(fs *pflag.FlagSet) (string, error)

func String

func String(fs *pflag.FlagSet, name string) (string, error)

func UInt64

func UInt64(fs *pflag.FlagSet, name string) (uint64, error)

func Verbose

func Verbose(fs *pflag.FlagSet) (int, error)

func VerboseLevel

func VerboseLevel(fs *pflag.FlagSet, max int) (int, error)

Types

type FeeFlag

type FeeFlag struct {
	Value uint64
	Fixed bool
}

func (*FeeFlag) AddFlag

func (f *FeeFlag) AddFlag(fs *pflag.FlagSet)

func (*FeeFlag) Set

func (f *FeeFlag) Set(v string) error

func (*FeeFlag) String

func (f *FeeFlag) String() string

func (*FeeFlag) Type

func (f *FeeFlag) Type() string

type FlagFunc

type FlagFunc = func(*pflag.FlagSet)

type FlagFuncMap

type FlagFuncMap map[*pflag.FlagSet][]FlagFunc

type NetworkFlag

type NetworkFlag string

func (*NetworkFlag) AddFlag

func (c *NetworkFlag) AddFlag(fs *pflag.FlagSet)

func (NetworkFlag) MustNetwork

func (c NetworkFlag) MustNetwork(cn string) params.Chain

func (NetworkFlag) Network

func (c NetworkFlag) Network(cn string) (params.Chain, error)

func (*NetworkFlag) Set

func (c *NetworkFlag) Set(v string) error

func (NetworkFlag) String

func (c NetworkFlag) String() string

func (NetworkFlag) Type

func (c NetworkFlag) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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