setting

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.6.0

type Config interface {
	// Load config load
	Load() error

	// IsSet is set value
	IsSet(key string) bool

	// ReadSection read val by key,val must be a pointer
	ReadSection(key string, val interface{}) error

	// Store save config to file
	Store(path string) error
}

Config interface associated with reading/saving configuration files.

func New added in v1.6.0

func New(opts ...Option) Config

New create a config interface.

type Option

type Option func(*Options)

Option for ConfigOption

func WithConfigFile added in v1.6.0

func WithConfigFile(configFile string) Option

WithConfigFile set config filename

func WithWatchFile

func WithWatchFile() Option

WithWatchFile watch file change

type Options added in v1.6.0

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

Option config option

Jump to

Keyboard shortcuts

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