mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-17 16:12:42 +08:00
config
This commit is contained in:
@ -5,11 +5,13 @@ import (
|
|||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Configure interface {
|
type NotifyFunc func(Configure) error
|
||||||
GetString(string, string) string
|
|
||||||
}
|
|
||||||
|
|
||||||
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 {
|
type conf struct {
|
||||||
viper *viper.Viper //
|
viper *viper.Viper //
|
||||||
|
Reference in New Issue
Block a user