config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
	Path string
	Type string
	*viper.Viper
}

func New

func New(configPath string) *Config

func (Config) Get

func (c Config) Get(key string) interface{}

func (Config) GetBool

func (c Config) GetBool(key string) bool

func (Config) GetDefault

func (c Config) GetDefault(key string, item interface{}) interface{}

func (Config) GetDefaultInt

func (c Config) GetDefaultInt(key string, item int) int

func (Config) GetDefaultString

func (c Config) GetDefaultString(key string, item string) string

func (Config) GetInt

func (c Config) GetInt(key string) int

func (Config) GetString

func (c Config) GetString(key string) string

type Option

type Option func(config *Config)

Jump to

Keyboard shortcuts

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