MCPcopy Create free account
hub / github.com/Monibuca/engine / ParseUserFile

Method ParseUserFile

config/config.go:216–236  ·  view source on GitHub ↗

ParseFile 第四步读取用户配置文件

(conf map[string]any)

Source from the content-addressed store, hash-verified

214
215// ParseFile 第四步读取用户配置文件
216func (config *Config) ParseUserFile(conf map[string]any) {
217 if conf == nil {
218 return
219 }
220 config.File = conf
221 for k, v := range conf {
222 if config.Has(k) {
223 if prop := config.Get(k); prop.props != nil {
224 if v != nil {
225 prop.ParseUserFile(v.(map[string]any))
226 }
227 } else {
228 fv := prop.assign(k, v)
229 prop.File = fv.Interface()
230 if prop.Env == nil {
231 prop.Ptr.Set(fv)
232 }
233 }
234 }
235 }
236}
237
238// ParseModifyFile 第五步读取动态修改配置文件
239func (config *Config) ParseModifyFile(conf map[string]any) {

Callers 1

RunFunction · 0.80

Calls 5

HasMethod · 0.95
GetMethod · 0.95
InterfaceMethod · 0.80
SetMethod · 0.80
assignMethod · 0.45

Tested by

no test coverage detected