comfyconf

package
v0.0.0-...-e2e6f4c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuchKey = errors.New("Use of undefined key")

Functions

func LoadValues

func LoadValues(fname string)

LoadValues one-shot loads a comfy config at the start of the application.

func Persist

func Persist() error

func PersistKeyValue

func PersistKeyValue(key, value string) error

func SetHas

func SetHas(conf *Setting[Set], key string) bool

func SetKeyValue

func SetKeyValue(key, value string) error

func Value

func Value(key string) (string, bool)

func Values

func Values() map[string]string

Types

type Set

type Set map[string]struct{}

type Setting

type Setting[T any] struct {
	// contains filtered or unexported fields
}

func BoolConf

func BoolConf(key string, defaultv bool) *Setting[bool]

func DurationConf

func DurationConf(key string, defaultv time.Duration) *Setting[time.Duration]

func Float64Conf

func Float64Conf(key string, defaultv float64) *Setting[float64]

func IntConf

func IntConf(key string, defaultv int) *Setting[int]

func RegexConf

func RegexConf(key string, defaultv *regexp.Regexp) *Setting[*regexp.Regexp]

func SetConf

func SetConf(key, defaultset string) *Setting[Set]

func StrConf

func StrConf(key string, defaultv string) *Setting[string]

func (*Setting[T]) Current

func (s *Setting[T]) Current() T

func (*Setting[T]) SetConfig

func (s *Setting[T]) SetConfig(key, value string) error

Jump to

Keyboard shortcuts

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