flags

package
v0.0.0-...-5b6e8be Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BeaconCategory     = "BEACON CHAIN"
	DevCategory        = "DEVELOPER CHAIN"
	StateCategory      = "STATE HISTORY MANAGEMENT"
	TxPoolCategory     = "TRANSACTION POOL (EVM)"
	BlobPoolCategory   = "TRANSACTION POOL (BLOB)"
	PerfCategory       = "PERFORMANCE TUNING"
	APICategory        = "API AND CONSOLE"
	NetworkingCategory = "NETWORKING"
	MinerCategory      = "MINER"
	GasPriceCategory   = "GAS PRICE ORACLE"
	VMCategory         = "VIRTUAL MACHINE"
	LoggingCategory    = "LOGGING AND DEBUGGING"
	MetricsCategory    = "METRICS AND STATS"
	MiscCategory       = "MISC"
	DeprecatedCategory = "ALIASED (deprecated)"
)

Variables

This section is empty.

Functions

func AutoEnvVars

func AutoEnvVars(cmd *cli.Command, prefix string)

AutoEnvVars extends all the specific CLI flags with automatically generated env vars by capitalizing the flag, replacing . with _ and prefixing it with the specified string.

Note, the prefix should *not* contain the separator underscore, that will be added automatically.

func CheckEnvVars

func CheckEnvVars(cmd *cli.Command, prefix string)

CheckEnvVars iterates over all the environment variables and checks if any of them look like a CLI flag but is not consumed. This can be used to detect old or mistyped names.

func FlagString

func FlagString(f cli.Flag) string

FlagString prints a single flag in help.

func HomeDir

func HomeDir() string

func NewApp

func NewApp(usage string) *cli.Command

NewApp creates an app with sane defaults.

Types

type DirectoryFlag

type DirectoryFlag = cli.FlagBase[string, cli.NoConfig, directoryValue]

DirectoryFlag is the cli.Flag type that wraps a directory value, converting the user input into an absolute path.

type Uint256Flag

type Uint256Flag = cli.FlagBase[*uint256.Int, cli.NoConfig, uint256Value]

Uint256Flag is the cli.Flag type that wraps a uint256 value, converting the user input into an absolute path.

Jump to

Keyboard shortcuts

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