Commit 3d0c6e69 authored by gwenn's avatar gwenn

Lint.

parent c203dcae
...@@ -4,7 +4,7 @@ Yet another SQLite binding based on: ...@@ -4,7 +4,7 @@ Yet another SQLite binding based on:
This binding implements the "database/sql/driver" interface. This binding implements the "database/sql/driver" interface.
See [package documentation](http://godoc.org/github.com/gwenn/gosqlite). [![GoDoc](https://godoc.org/github.com/gwenn/gosqlite?status.png)](https://godoc.org/github.com/gwenn/gosqlite)
[![Build Status][1]][2] [![Build Status][1]][2]
......
...@@ -50,7 +50,7 @@ func (t *UnixTime) Scan(src interface{}) error { ...@@ -50,7 +50,7 @@ func (t *UnixTime) Scan(src interface{}) error {
*t = UnixTime(time.Unix(unixepoch, 0)) // local time *t = UnixTime(time.Unix(unixepoch, 0)) // local time
return nil return nil
} }
return fmt.Errorf("Unsupported UnixTime src: %T", src) return fmt.Errorf("unsupported UnixTime src: %T", src)
} }
// Value implements the database/sql/driver/Valuer interface // Value implements the database/sql/driver/Valuer interface
...@@ -73,7 +73,7 @@ func (t *JulianTime) Scan(src interface{}) error { ...@@ -73,7 +73,7 @@ func (t *JulianTime) Scan(src interface{}) error {
*t = JulianTime(JulianDayToLocalTime(jd)) // local time *t = JulianTime(JulianDayToLocalTime(jd)) // local time
return nil return nil
} }
return fmt.Errorf("Unsupported JulianTime src: %T", src) return fmt.Errorf("unsupported JulianTime src: %T", src)
} }
// Value implements the database/sql/driver/Valuer interface // Value implements the database/sql/driver/Valuer interface
...@@ -100,7 +100,7 @@ func (t *TimeStamp) Scan(src interface{}) error { ...@@ -100,7 +100,7 @@ func (t *TimeStamp) Scan(src interface{}) error {
*t = TimeStamp(v) *t = TimeStamp(v)
return nil return nil
} }
return fmt.Errorf("Unsupported TimeStamp src: %T", src) return fmt.Errorf("unsupported TimeStamp src: %T", src)
} }
// Value implements the database/sql/driver/Valuer interface // Value implements the database/sql/driver/Valuer interface
......
...@@ -142,7 +142,7 @@ func (s *stmt) RowsAffected() (int64, error) { ...@@ -142,7 +142,7 @@ func (s *stmt) RowsAffected() (int64, error) {
func (s *stmt) Query(args []driver.Value) (driver.Rows, error) { func (s *stmt) Query(args []driver.Value) (driver.Rows, error) {
if s.rowsRef { if s.rowsRef {
return nil, errors.New("Previously returned Rows still not closed") return nil, errors.New("previously returned Rows still not closed")
} }
if err := s.bind(args); err != nil { if err := s.bind(args); err != nil {
return nil, err return nil, err
......
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
package sqlite_test package sqlite_test
import ( import (
"github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite"
"math" "math"
"reflect" "reflect"
"testing" "testing"
"time" "time"
"unsafe" "unsafe"
"github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite"
) )
func checkFinalize(s *Stmt, t *testing.T) { func checkFinalize(s *Stmt, t *testing.T) {
...@@ -480,7 +481,7 @@ func TestIntOnArch64(t *testing.T) { ...@@ -480,7 +481,7 @@ func TestIntOnArch64(t *testing.T) {
createTable(db, t) createTable(db, t)
if unsafe.Sizeof(int(0)) > 4 { if unsafe.Sizeof(int(0)) > 4 {
var i int = math.MaxInt64 var i = math.MaxInt64
err := db.Exec("INSERT INTO test (int_num) VALUES (?)", i) err := db.Exec("INSERT INTO test (int_num) VALUES (?)", i)
checkNoError(t, err, "insert error: %s") checkNoError(t, err, "insert error: %s")
var r int var r int
......
...@@ -6,9 +6,10 @@ package sqlite_test ...@@ -6,9 +6,10 @@ package sqlite_test
import ( import (
"fmt" "fmt"
"testing"
"github.com/bmizerany/assert" "github.com/bmizerany/assert"
. "github.com/gwenn/gosqlite" . "github.com/gwenn/gosqlite"
"testing"
) )
type testModule struct { type testModule struct {
...@@ -87,7 +88,7 @@ func (vc *testVTabCursor) Eof() bool { ...@@ -87,7 +88,7 @@ func (vc *testVTabCursor) Eof() bool {
func (vc *testVTabCursor) Column(c *Context, col int) error { func (vc *testVTabCursor) Column(c *Context, col int) error {
//fmt.Printf("testVTabCursor.Column(%d): %v\n", col, vc) //fmt.Printf("testVTabCursor.Column(%d): %v\n", col, vc)
if col != 0 { if col != 0 {
return fmt.Errorf("Column index out of bounds: %d", col) return fmt.Errorf("column index out of bounds: %d", col)
} }
c.ResultInt(vc.vTab.intarray[vc.index]) c.ResultInt(vc.vTab.intarray[vc.index])
return nil return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment