flag

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpochVar

func EpochVar(f *pflag.FlagSet, p *beaconcommon.Epoch, name string, value beaconcommon.Epoch, usage string)

EpochVar registers a beaconcommon.Epoch custom flag with specified name, default value, and usage string. The argument p points to a beaconcommon.Epoch variable in which to store the value of the flag

func EpochVarP

func EpochVarP(f *pflag.FlagSet, p *beaconcommon.Epoch, name, shorthand string, value beaconcommon.Epoch, usage string)

EpochVar registers a beaconcommon.Epoch custom flag with specified name and shorthand, default value, and usage string. The argument p points to a beaconcommon.Epoch variable in which to store the value of the flag

func GweiVar

func GweiVar(f *pflag.FlagSet, p *beaconcommon.Gwei, name string, value beaconcommon.Gwei, usage string)

GweiVar registers a beaconcommon.Gwei custom flag with specified name, default value, and usage string. The argument p points to a beaconcommon.Gwei variable in which to store the value of the flag

func GweiVarP

func GweiVarP(f *pflag.FlagSet, p *beaconcommon.Gwei, name, shorthand string, value beaconcommon.Gwei, usage string)

GweiVar registers a beaconcommon.Gwei custom flag with specified name and shorthand, default value, and usage string. The argument p points to a beaconcommon.Gwei variable in which to store the value of the flag

func RootVar

func RootVar(f *pflag.FlagSet, p *beaconcommon.Root, name string, value beaconcommon.Root, usage string)

RootVar registers a beaconcommon.Root custom flag with specified name, default value, and usage string. The argument p points to a beaconcommon.Root variable in which to store the value of the flag

func RootVarP

func RootVarP(f *pflag.FlagSet, p *beaconcommon.Root, name, shorthand string, value beaconcommon.Root, usage string)

RootVar registers a beaconcommon.Root custom flag with specified name and shorthand, default value, and usage string. The argument p points to a beaconcommon.Root variable in which to store the value of the flag

func SlotVar

func SlotVar(f *pflag.FlagSet, p *beaconcommon.Slot, name string, value beaconcommon.Slot, usage string)

SlotVar registers a beaconcommon.Slot custom flag with specified name, default value, and usage string. The argument p points to a beaconcommon.Slot variable in which to store the value of the flag

func SlotVarP

func SlotVarP(f *pflag.FlagSet, p *beaconcommon.Slot, name, shorthand string, value beaconcommon.Slot, usage string)

SlotVar registers a beaconcommon.Slot custom flag with specified name and shorthand, default value, and usage string. The argument p points to a beaconcommon.Slot variable in which to store the value of the flag

Types

type GweiValue

type GweiValue struct {
	Gwei *beaconcommon.Gwei
}

GweiValue is a type implenting pflag.Value interface for beaconcommon.Gwei type

func (*GweiValue) Set

func (v *GweiValue) Set(s string) error

func (*GweiValue) String

func (v *GweiValue) String() string

func (*GweiValue) Type

func (v *GweiValue) Type() string

type RootValue

type RootValue struct {
	Root *beaconcommon.Root
}

RootValue is a type implenting pflag.Value interface for beaconcommon.Root type

func (*RootValue) Set

func (v *RootValue) Set(s string) error

func (*RootValue) String

func (v *RootValue) String() string

func (*RootValue) Type

func (v *RootValue) Type() string

Jump to

Keyboard shortcuts

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