Code

Log the remote server version on startup.
authorSebastian Harl <sh@tokkee.org>
Sun, 22 Feb 2015 18:27:31 +0000 (19:27 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 22 Feb 2015 18:27:31 +0000 (19:27 +0100)
main.go

diff --git a/main.go b/main.go
index e74ec554648a5c4ed974b2eab9842a78f793a005..0b2bfae0e9b4aaf1b1aa9089a62736951d630726 100644 (file)
--- a/main.go
+++ b/main.go
@@ -71,6 +71,11 @@ func main() {
                }
                conns = append(conns, conn)
        }
+       major, minor, patch, extra, err := conns[0].ServerVersion()
+       if err != nil {
+               fatalf("Failed to query server version: %v", err)
+       }
+       log.Printf("Connected to SysDB %d.%d.%d%s.", major, minor, patch, extra)
 
        srv, err := server.New(server.Config{
                Conns:        conns,