owl-blogs/app/config_register.go

14 lines
279 B
Go
Raw Normal View History

2023-07-22 18:34:17 +00:00
package app
type ConfigRegister struct {
configs map[string]interface{}
}
func NewConfigRegister() *ConfigRegister {
return &ConfigRegister{configs: map[string]interface{}{}}
}
func (r *ConfigRegister) Register(name string, config interface{}) {
r.configs[name] = config
}