binding

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package binding binds flags to external configuration systems, such as Viper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Viper

type Viper struct {
	flag.Value

	ConfigKey string
}

Viper binds a command flag (given by a flag.Value instance) to a ConfigKey for Viper. Implements flag.Binding.

func (Viper) BindTo

func (v Viper) BindTo() flag.Binder

BindTo binds the flag of the command to a viper configuration value.

Jump to

Keyboard shortcuts

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