func Example_test_version() { major, minor, _ := zmq.Version() fmt.Println("Version major:", major) fmt.Println("Version minor == 1|2:", minor == 1 || minor == 2) // Output: // Version major: 2 // Version minor == 1|2: true }
func TestVersion(t *testing.T) { major, _, _ := zmq.Version() if major != 2 { t.Errorf("Expected major version 2, got %d", major) } }
func main() { major, minor, patch := zmq.Version() fmt.Printf("Current 0MQ version is %d.%d.%d\n", major, minor, patch) }