Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlazed
deprecated
added in
v0.2.0
InitGlazed adds the logging section to the root command without wiring Viper.
Deprecated: logging and command config setup are Glazed territory. Replace
clay.InitGlazed(appName, rootCmd)
with
logging.AddLoggingSectionToRootCommand(rootCmd, appName)
from github.com/go-go-golems/glazed/pkg/cmds/logging, and keep initializing logging in PersistentPreRunE with logging.InitLoggerFromCobra(cmd). Configure environment variables and config files through Glazed's cli.CobraParserConfig (AppName plus ConfigPlanBuilder / config sources), not through Clay/Viper.
func InitViperInstanceWithAppName
deprecated
added in
v0.1.20
Deprecated: config loading is Glazed territory now. Avoid Viper instances for command configuration; use Glazed's cli.CobraParserConfig with AppName for environment variables and a ConfigPlanBuilder / config sources for files. Keep Clay imports only for Clay-specific packages such as pkg/sql.
func InitViperWithAppName
deprecated
added in
v0.1.15
Deprecated: config loading is Glazed territory now. Use Glazed's cli.CobraParserConfig with AppName for environment variables and a ConfigPlanBuilder / config sources for files instead of initializing Viper through Clay. For logging, add Glazed's logging section directly with logging.AddLoggingSectionToRootCommand(rootCmd, appName) and initialize it in PersistentPreRunE with logging.InitLoggerFromCobra(cmd).
Types ¶
This section is empty.