MCPcopy
hub / github.com/awake1t/linglong / ReadSection

Method ReadSection

pkg/setting/section.go:45–55  ·  view source on GitHub ↗
(k string, v interface{})

Source from the content-addressed store, hash-verified

43var sections = make(map[string]interface{})
44
45func (s *Setting) ReadSection(k string, v interface{}) error {
46 err := s.vp.UnmarshalKey(k, v)
47 if err != nil {
48 return err
49 }
50
51 if _, ok := sections[k]; !ok {
52 sections[k] = v
53 }
54 return nil
55}
56
57func (s *Setting) ReloadAllSection() error {
58 for k, v := range sections {

Callers 2

setupSettingFunction · 0.95
ReloadAllSectionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected