MCPcopy Index your code
hub / github.com/coder/coder / IsCompatibleWith

Method IsCompatibleWith

vpn/version.go:69–78  ·  view source on GitHub ↗

IsCompatibleWith returns the lowest version that is compatible with both versions. If the versions are not compatible, the second return value will be false.

(other RPCVersion)

Source from the content-addressed store, hash-verified

67// versions. If the versions are not compatible, the second return value will be
68// false.
69func (v RPCVersion) IsCompatibleWith(other RPCVersion) (RPCVersion, bool) {
70 if v.Major != other.Major {
71 return RPCVersion{}, false
72 }
73 // The lowest minor version from the two versions should be returned.
74 if v.Minor < other.Minor {
75 return v, true
76 }
77 return other, true
78}
79
80// RPCVersionList represents a list of RPC versions supported by a RPC peer. An
81type RPCVersionList struct {

Callers 3

validateHeaderFunction · 0.45
IsCompatibleWithMethod · 0.45

Calls

no outgoing calls

Tested by 1