pkg

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 7 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGlazed deprecated added in v0.2.0

func InitGlazed(appName string, rootCmd *cobra.Command) error

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

func InitViperInstanceWithAppName(appName string, configFile string) (*viper.Viper, error)

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

func InitViperWithAppName(appName string, configFile string) error

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.

Jump to

Keyboard shortcuts

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