示例#1
0
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
}
示例#2
0
func TestVersion(t *testing.T) {
	major, _, _ := zmq.Version()
	if major != 2 {
		t.Errorf("Expected major version 2, got %d", major)
	}
}
示例#3
0
func main() {
	major, minor, patch := zmq.Version()
	fmt.Printf("Current 0MQ version is %d.%d.%d\n", major, minor, patch)
}