diff --git a/conn.go b/conn.go index fa8c35d8..fb484e52 100644 --- a/conn.go +++ b/conn.go @@ -9,11 +9,11 @@ import ( ) type conn struct { - conn net.Conn // the underlying TCP or unix domain socket connection - rowDesc rowDescription // current query rowDescription - buf []byte // work buffer to avoid constant alloc and dealloc - pid int32 // backend pid - secretKey int32 // key to use to send a cancel query message to the server + conn net.Conn // the underlying TCP or unix domain socket connection + rowDesc rowDescription // current query rowDescription + buf []byte // work buffer to avoid constant alloc and dealloc + pid int32 // backend pid + secretKey int32 // key to use to send a cancel query message to the server runtimeParams map[string]string // parameters that have been reported by the server } @@ -240,7 +240,6 @@ func (c *conn) rxDataRow(buf []byte) (row map[string]string, err error) { return } - func (c *conn) rxCommandComplete(buf []byte) string { r := newMessageReader(buf) return r.readString() diff --git a/conn_test.go b/conn_test.go index fbd1246f..512297bb 100644 --- a/conn_test.go +++ b/conn_test.go @@ -28,7 +28,6 @@ func TestConnect(t *testing.T) { } } - func TestQuery(t *testing.T) { conn, err := Connect(map[string]string{"socket": "/private/tmp/.s.PGSQL.5432"}) if err != nil { @@ -53,4 +52,4 @@ func TestQuery(t *testing.T) { if err != nil { t.Fatal("Unable to close connection") } -} \ No newline at end of file +} diff --git a/message_reader.go b/message_reader.go index f1b07fb0..581e4536 100644 --- a/message_reader.go +++ b/message_reader.go @@ -1,8 +1,8 @@ package pqx import ( - "encoding/binary" "bytes" + "encoding/binary" ) type messageReader []byte diff --git a/messages.go b/messages.go index e9c98c93..ea87dfef 100644 --- a/messages.go +++ b/messages.go @@ -49,13 +49,13 @@ func (self *readyForQuery) String() string { type oid int32 type fieldDescription struct { - name string - table oid + name string + table oid attributeNumber int16 - dataType oid - dataTypeSize int16 - modifier int32 - formatCode int16 + dataType oid + dataTypeSize int16 + modifier int32 + formatCode int16 } type rowDescription struct {