MCPcopy
hub / github.com/nats-io/nats.go / serverVersionAtLeast

Function serverVersionAtLeast

test/cluster_test.go:44–53  ·  view source on GitHub ↗
(major, minor, update int)

Source from the content-addressed store, hash-verified

42var servers = strings.Join(testServers, ",")
43
44func serverVersionAtLeast(major, minor, update int) error {
45 var (
46 ma, mi, up int
47 )
48 fmt.Sscanf(server.VERSION, "%d.%d.%d", &ma, &mi, &up)
49 if ma > major || (ma == major && mi > minor) || (ma == major && mi == minor && up >= update) {
50 return nil
51 }
52 return fmt.Errorf("Server version is %v, requires %d.%d.%d+", server.VERSION, major, minor, update)
53}
54
55func TestServersOption(t *testing.T) {
56 opts := nats.GetDefaultOptions()

Callers 2

TestGetClientIDFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected