1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00

1 Commits

Author SHA1 Message Date
a83ccf7c00 config 2023-12-13 17:26:23 +08:00

View File

@ -5,11 +5,13 @@ import (
"github.com/spf13/viper"
)
type Configure interface {
GetString(string, string) string
}
type NotifyFunc func(Configure) error
type NotifyFunc func(Configure)
type Configure interface {
Load(dataId string, v any, onChanged ...NotifyFunc) error
GetString(string, string) string
GetInt(key string, defaultValue int) int
}
type conf struct {
viper *viper.Viper //