Documentation
¶
Overview ¶
Package flags manages command-line flag binding and configuration for godyl.
It provides utilities for binding cobra flags to viper configuration and defines standardized flag sets for different command types. This package handles environment variable integration, flag parsing, and configuration unmarshalling to ensure consistent behavior across all commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
Bind connects cobra flags to viper and unmarshals the configuration into the provided struct. It sets up environment variable handling with the given prefix and handles flag binding. Omit the prefix to use the command hierarchy as the prefix.
func ChainPreRun ¶ added in v0.0.4
ChainPreRun is a helper function to chain the PreRunE functions of a command and its parent.
func Root ¶
Root adds the root-level command flags to the provided cobra command. These flags apply to the root command.
Types ¶
This section is empty.