Browse files

Merge pull request #201 from kavu/go-version-example

Added 0MQ Version example in Go
  • Loading branch information...
2 parents 02cbf4d + 49be742 commit 95620be8c3580809b8ab46d2e1aa0d3b652029b8 @hintjens hintjens committed May 9, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 examples/Go/version.go
View
17 examples/Go/version.go
@@ -0,0 +1,17 @@
+//
+// 0MQ version example.
+//
+// Author: Max Riveiro <kavu13@gmail.com>
+// Requires: http://github.com/alecthomas/gozmq
+//
+package main
+
+import (
+ "fmt"
+ zmq "github.com/alecthomas/gozmq"
+)
+
+func main() {
+ major, minor, patch := zmq.Version()
+ fmt.Printf("Current 0MQ version is %d.%d.%d\n", major, minor, patch)
+}

0 comments on commit 95620be

Please sign in to comment.