1 Star 0 Fork 21

wangyfbe / go-admin-core

forked from go-admin-team / go-admin-core 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
options.go 721 Bytes
一键复制 编辑 原始数据 按行查看 历史
brandwwang 提交于 2023-06-03 18:01 . change go mod
package config
import (
"gitee.com/wangyfbe/go-admin-core/config/loader"
"gitee.com/wangyfbe/go-admin-core/config/reader"
"gitee.com/wangyfbe/go-admin-core/config/source"
)
// WithLoader sets the loader for manager config
func WithLoader(l loader.Loader) Option {
return func(o *Options) {
o.Loader = l
}
}
// WithSource appends a source to list of sources
func WithSource(s source.Source) Option {
return func(o *Options) {
o.Source = append(o.Source, s)
}
}
// WithReader sets the config reader
func WithReader(r reader.Reader) Option {
return func(o *Options) {
o.Reader = r
}
}
// WithEntity sets the config Entity
func WithEntity(e Entity) Option {
return func(o *Options) {
o.Entity = e
}
}
Go
1
https://gitee.com/wangyfbe/go-admin-core.git
git@gitee.com:wangyfbe/go-admin-core.git
wangyfbe
go-admin-core
go-admin-core
v1.10.3

搜索帮助

53164aa7 5694891 3bd8fe86 5694891