diff --git a/.travis.yml b/.travis.yml index 3cf3c5d2b..0210973ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ language: go go: - - 1.1 - 1.2 + - 1.3 + - tip script: - bash integration.sh diff --git a/README.md b/README.md index 10e5f5ad6..d0ffb2dbc 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Project Website: http://gocql.github.io/
API documentation: http://godoc.org/github.com/gocql/gocql
Discussions: https://groups.google.com/forum/#!forum/gocql +Supported Versions: Cassandra 1.2, 2.0, 2.1; Go 1.2, 1.3 + Installation ------------ @@ -22,7 +24,7 @@ Installation Features -------- -* Modern Cassandra client for Cassandra 1.2 and 2.0 +* Modern Cassandra client using the native transport * Automatic type conversations between Cassandra and Go * Support for all common types including sets, lists and maps * Custom types can implement a `Marshaler` and `Unmarshaler` interface diff --git a/conn.go b/conn.go index 81e64a003..86022705e 100644 --- a/conn.go +++ b/conn.go @@ -606,6 +606,19 @@ func (c *Conn) decodeFrame(f frame, trace Tracer) (rval interface{}, err error) } } +func (c *Conn) setKeepalive(d time.Duration) error { + if tc, ok := c.conn.(*net.TCPConn); ok { + err := tc.SetKeepAlivePeriod(d) + if err != nil { + return err + } + + return tc.SetKeepAlive(true) + } + + return nil +} + type queryInfo struct { id []byte args []ColumnInfo diff --git a/conn_go11.go b/conn_go11.go deleted file mode 100644 index addc8e055..000000000 --- a/conn_go11.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build !go1.2 - -package gocql - -import ( - "log" - "time" -) - -func (c *Conn) setKeepalive(d time.Duration) error { - log.Println("WARN: KeepAlive provided but not supported on Go < 1.2") - return nil -} diff --git a/conn_go12.go b/conn_go12.go deleted file mode 100644 index c7c8b0cbe..000000000 --- a/conn_go12.go +++ /dev/null @@ -1,21 +0,0 @@ -// +build go1.2 - -package gocql - -import ( - "net" - "time" -) - -func (c *Conn) setKeepalive(d time.Duration) error { - if tc, ok := c.conn.(*net.TCPConn); ok { - err := tc.SetKeepAlivePeriod(d) - if err != nil { - return err - } - - return tc.SetKeepAlive(true) - } - - return nil -}