Documentation
¶
Overview ¶
Package flags provides CLI flag handling utilities including benchmark timing.
Index ¶
Constants ¶
View Source
const ( // BenchmarkFlagName is the global/root persistent flag that enables benchmark output. BenchmarkFlagName = "benchmark" // ConfigFlagName is the global/root persistent flag that specifies an alternate config file path. ConfigFlagName = "config" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶ added in v5.72.0
GetConfigPath returns the config file path from the --config persistent flag. Returns an empty string if the flag is not set or not found.
func IsBenchmarkEnabled ¶ added in v5.30.0
IsBenchmarkEnabled reports whether the current command invocation has benchmark enabled.
The flag is defined as a root persistent flag and inherited by subcommands.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.