Browse Source

Merge pull request #152 from go-sql-driver/cleanup

Cleanup
Julien Schmidt 12 years ago
parent
commit
0602457cb5
2 changed files with 6 additions and 7 deletions
  1. 4 5
      connection.go
  2. 2 2
      utils_test.go

+ 4 - 5
connection.go

@@ -18,16 +18,15 @@ import (
 )
 
 type mysqlConn struct {
-	cfg              *config
-	flags            clientFlag
-	netConn          net.Conn
 	buf              *buffer
-	protocol         uint8
-	sequence         uint8
+	netConn          net.Conn
 	affectedRows     uint64
 	insertId         uint64
+	cfg              *config
 	maxPacketAllowed int
 	maxWriteSize     int
+	flags            clientFlag
+	sequence         uint8
 	parseTime        bool
 	strict           bool
 }

+ 2 - 2
utils_test.go

@@ -112,10 +112,10 @@ func TestScanNullTime(t *testing.T) {
 	for _, tst := range scanTests {
 		err = nt.Scan(tst.in)
 		if (err != nil) != tst.error {
-			t.Errorf("%v: expected error status %b, got %b", tst.in, tst.error, (err != nil))
+			t.Errorf("%v: expected error status %t, got %t", tst.in, tst.error, (err != nil))
 		}
 		if nt.Valid != tst.valid {
-			t.Errorf("%v: expected valid status %b, got %b", tst.in, tst.valid, nt.Valid)
+			t.Errorf("%v: expected valid status %t, got %t", tst.in, tst.valid, nt.Valid)
 		}
 		if nt.Time != tst.time {
 			t.Errorf("%v: expected time %v, got %v", tst.in, tst.time, nt.Time)