3 Star 5 Fork 3

三三物联网/ssiot-core

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
options.go 728 Bytes
Copy Edit Raw Blame History
三三物联网 authored 2023-04-03 00:22 . 重构
package tool
import (
"gitee.com/sansaniot/ssiot-core/config/tool/loader"
"gitee.com/sansaniot/ssiot-core/config/tool/reader"
"gitee.com/sansaniot/ssiot-core/config/tool/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/sansaniot/ssiot-core.git
git@gitee.com:sansaniot/ssiot-core.git
sansaniot
ssiot-core
ssiot-core
v1.7.8

Search

D67c1975 1850385 1daf7b77 1850385