config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigInterface

type ConfigInterface interface {
	// Load load config
	Load(opts ...Option) error
	// IsSet is set value
	IsSet(key string) bool
	// GetValue get key to obj,obj must be a pointer
	GetValue(key string, obj interface{}) error
}

ConfigInterface config load interface

func New

func New(opts ...Option) ConfigInterface

xNew create a config interface.

type ConfigOption

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

ConfigOption config option

type Option

type Option func(*ConfigOption)

Option for ConfigOption

func WithConfigDir

func WithConfigDir(dir string) Option

WithConfigDir set config dir

func WithConfigFile

func WithConfigFile(file string) Option

WithConfigFile set config filename

Jump to

Keyboard shortcuts

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