MCPcopy
hub / github.com/helm/helm / peekAPIVersion

Function peekAPIVersion

internal/plugin/loader.go:33–45  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

31)
32
33func peekAPIVersion(r io.Reader) (string, error) {
34 type apiVersion struct {
35 APIVersion string `yaml:"apiVersion"`
36 }
37
38 var v apiVersion
39 d := yaml.NewDecoder(r)
40 if err := d.Decode(&v); err != nil {
41 return "", err
42 }
43
44 return v.APIVersion, nil
45}
46
47func loadMetadataLegacy(metadataData []byte) (*Metadata, error) {
48

Callers 2

TestPeekAPIVersionFunction · 0.85
loadMetadataFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestPeekAPIVersionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…