MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / Reload

Method Reload

pkg/common/config.go:35–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33var GlobalObject *GlobalObj
34
35func (g *GlobalObj) Reload() {
36 file, err := os.ReadFile("config/config.yaml")
37 if err != nil {
38 fmt.Println("read config/config.yaml err:", err)
39 return
40 }
41 err = yaml.Unmarshal(file, g)
42 if err != nil {
43 fmt.Println("conf Unmarshal err:", err)
44 return
45 }
46}
47
48func init() {
49 GlobalObject = &GlobalObj{}

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected