MCPcopy Create free account
hub / github.com/FairwindsOps/pluto / checkVersion

Method checkVersion

pkg/api/versions.go:85–98  ·  view source on GitHub ↗
(stub *Stub)

Source from the content-addressed store, hash-verified

83}
84
85func (instance *Instance) checkVersion(stub *Stub) *Version {
86 for _, version := range instance.DeprecatedVersions {
87 // We allow empty kinds to deprecate whole APIs.
88 if version.Kind == "" || version.Kind == stub.Kind {
89 if version.Name == stub.APIVersion {
90 if version.Kind == "" {
91 version.Kind = stub.Kind
92 }
93 return &version
94 }
95 }
96 }
97 return nil
98}
99
100// IsVersioned returns a version if the file data sent
101// can be unmarshaled into a stub and matches a known

Callers 2

IsVersionedMethod · 0.95

Calls

no outgoing calls

Tested by 1