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

Function hasSupportedVersion

cli/server.go:1976–1984  ·  view source on GitHub ↗

hasSupportedVersion is a helper function that returns true if the list of supported versions contains a version between min and max. If the versions list is outside the min/max, then it returns false.

(minVal, maxVal uint16, versions []uint16)

Source from the content-addressed store, hash-verified

1974// of supported versions contains a version between min and max.
1975// If the versions list is outside the min/max, then it returns false.
1976func hasSupportedVersion(minVal, maxVal uint16, versions []uint16) bool {
1977 for _, v := range versions {
1978 if v >= minVal && v <= maxVal {
1979 // If one version is in between min/max, return true.
1980 return true
1981 }
1982 }
1983 return false
1984}
1985
1986// versionName is tls.VersionName in go 1.21.
1987// Until the switch, the function is copied locally.

Callers 1

configureCipherSuitesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected