mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-11-01 14:57:38 +00:00
批 1,不含 SDK 仓与目录改名。 - go.mod 第 1 行 module 路径 - 366 个 .go 文件的完整前缀 github.com/JianFeeeee/HomeAgent 机械替换 (857 处,仅完整前缀;展示名/注释里的 HomeAgent 字样留给批 5) - 未改:third_party 目录名、SDK 自身 go.mod module、go.mod replace 目标、 homed/waiter 可执行名、.hmap 后缀
23 lines
438 B
Go
23 lines
438 B
Go
package sdk
|
|
|
|
import "github.com/JianFeeeee/HologramAgent/pkg/types"
|
|
|
|
// configImpl 持有运行期配置对象的引用(与配置数据库无关)。
|
|
type configImpl struct {
|
|
cfg *types.Config
|
|
}
|
|
|
|
func NewConfig(cfg *types.Config) ConfigAPI {
|
|
return &configImpl{cfg: cfg}
|
|
}
|
|
|
|
func (c *configImpl) Get() *types.Config {
|
|
return c.cfg
|
|
}
|
|
|
|
func (c *configImpl) Put(cfg *types.Config) {
|
|
c.cfg = cfg
|
|
}
|
|
|
|
var _ ConfigAPI = (*configImpl)(nil)
|