MCPcopy Create free account
hub / github.com/helm/helm / K8sIOClientGoModVersion

Function K8sIOClientGoModVersion

internal/version/clientgo.go:27–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25)
26
27func K8sIOClientGoModVersion() (string, error) {
28 info, ok := debug.ReadBuildInfo()
29 if !ok {
30 return "", errors.New("failed to read build info")
31 }
32
33 idx := slices.IndexFunc(info.Deps, func(m *debug.Module) bool {
34 return m.Path == "k8s.io/client-go"
35 })
36
37 if idx == -1 {
38 return "", errors.New("k8s.io/client-go not found in build info")
39 }
40
41 m := info.Deps[idx]
42
43 return m.Version, nil
44}

Callers 2

GetFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…