1 Star 0 Fork 0

linxing/youye-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
options.go 721 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mark 提交于 2024-01-29 17:39 . rename package
package config
import (
"gitee.com/linxing_3/youye-core/config/loader"
"gitee.com/linxing_3/youye-core/config/reader"
"gitee.com/linxing_3/youye-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
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linxing_3/youye-core.git
git@gitee.com:linxing_3/youye-core.git
linxing_3
youye-core
youye-core
v0.0.1-202404081105

搜索帮助