flags

package
v0.0.0-...-f94ef0f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAddress

func ParseAddress(s string) (common.Address, error)

ParseAddress parses Uint160 form either LE string or address.

Types

type Address

type Address struct {
	IsSet bool
	Value common.Address
}

Address is a wrapper for Uint160 with flag.Value methods.

func (*Address) Address

func (a *Address) Address() (u common.Address)

Uint160 casts address to Uint160.

func (*Address) Set

func (a *Address) Set(s string) error

Set implements flag.Value interface.

func (Address) String

func (a Address) String() string

String implements fmt.Stringer interface.

type AddressFlag

type AddressFlag struct {
	Name  string
	Usage string
	Value Address
}

AddressFlag is a flag with type string.

func (AddressFlag) Apply

func (f AddressFlag) Apply(set *flag.FlagSet)

Apply populates the flag given the flag set and environment Ignores errors.

func (AddressFlag) GetName

func (f AddressFlag) GetName() string

GetName returns the name of the flag.

func (AddressFlag) IsSet

func (f AddressFlag) IsSet() bool

IsSet checks if flag was set to a non-default value.

func (AddressFlag) String

func (f AddressFlag) String() string

String returns a readable representation of this value (for usage defaults).

Jump to

Keyboard shortcuts

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