config

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlagsToViper

func BindFlagsToViper(cmd *cobra.Command, viper *viper.Viper)

Bind each cobra flag to its associated viper configuration (config file and environment variable) This approach cribbed from https://github.com/carolynvs/stingoftheviper/blob/19bd73117f0285436505ca17616cbc394d22e63d/main.go

func Configure

func Configure(cmd *cobra.Command) error

func InitColor

func InitColor(rootCmd *cobra.Command)

func SetupViper

func SetupViper(cfgFile string) (*viper.Viper, error)

Types

type BundleConfig

type BundleConfig struct {
	BundlesFolder string `mapstructure:"bundles_folder"`
}

Jump to

Keyboard shortcuts

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