INNER CODE UNIT · Go

configStringMapVar

bank-vaults/bank-vaults · cmd/bank-vaults/main.go:181

func configStringMapVar(cmd *cobra.Command, key string, defaultValue map[string]string, description string) {
	cmd.PersistentFlags().StringToString(key, defaultValue, description)
	_ = c.BindPFlag(key, cmd.PersistentFlags().Lookup(key))
}

func init() {
	c.SetEnvPrefix("bank_vaults")
	replacer := strings.NewReplacer("-", "_")
	c.SetEnvKeyReplacer(replacer)
	c.AutomaticEnv()

	// Select mode
	configStringVar(
		rootCmd,
		cfgMode,
		cfgModeValueK8S,
		fmt.Sprintf(`Select the mode to use:
						'%s' => Google Cloud Storage using Google KMS encryption;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…