MCPcopy Create free account
hub / github.com/52funny/pikpakcli / readConfig

Function readConfig

conf/config.go:152–167  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

150}
151
152func readConfig(path string) error {
153 f, err := os.Open(path)
154 if err != nil {
155 return err
156 }
157 defer f.Close()
158 bs, err := io.ReadAll(f)
159 if err != nil {
160 return err
161 }
162 err = yaml.Unmarshal(bs, &Config)
163 if err != nil {
164 return err
165 }
166 return nil
167}

Callers 2

readFromPathFunction · 0.85
readFromConfigDirFunction · 0.85

Calls 1

CloseMethod · 0.80

Tested by

no test coverage detected