snakecharmer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SnakeCharmer

type SnakeCharmer struct {
	// contains filtered or unexported fields
}

SnakeCharmer binds a viper instance to a cobra.Command instance

func NewSnakeCharmer

func NewSnakeCharmer(envPrefix string, confName string) SnakeCharmer

NewSnakeCharmer constructs a new SnakeCharmer

func (SnakeCharmer) InitConfig

func (sc SnakeCharmer) InitConfig(cmd *cobra.Command, confPath string) error

InitConfig imports values from viper into the input cmd object to form a single consistent view of config information. Passing an empty confPath will cause viper to look in the current and home directories for a config file.

Jump to

Keyboard shortcuts

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