MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Read

Function Read

module/dynamic-module/driver/read.go:7–24  ·  view source on GitHub ↗
(input []byte)

Source from the content-addressed store, hash-verified

5)
6
7func Read(input []byte) (*PluginCfg, error) {
8
9 p := new(PluginCfg)
10
11 err := yaml.Unmarshal(input, &p)
12 if err != nil {
13 return nil, err
14 }
15 err = yaml.Unmarshal(input, p)
16 if err != nil {
17 return nil, err
18 }
19 if p.Version == "" {
20 p.Version = "v0.0.0"
21 }
22
23 return p, nil
24}

Callers 1

LoadPluginsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected