MCPcopy
hub / github.com/tinode/chat / versionCompare

Function versionCompare

server/utils.go:686–688  ·  view source on GitHub ↗

Returns > 0 if v1 > v2; zero if equal; < 0 if v1 < v2 Only Major and Minor parts are compared, the trailer is ignored.

(v1, v2 int)

Source from the content-addressed store, hash-verified

684// Returns > 0 if v1 > v2; zero if equal; < 0 if v1 < v2
685// Only Major and Minor parts are compared, the trailer is ignored.
686func versionCompare(v1, v2 int) int {
687 return (v1 >> 8) - (v2 >> 8)
688}
689
690func max(a, b int) int {
691 if a > b {

Callers 1

helloMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…