Commit 15371c0d authored by gwenn's avatar gwenn

Trim tail.

parent 492aec2b
language: go
sudo: false
go:
- 1.4
- tip
before_install:
- echo "yes" | sudo add-apt-repository ppa:travis-ci/sqlite3
- sudo apt-get update -qq
- sudo apt-get install -qq libsqlite3-dev
addons:
apt:
sources:
- debian-sid
packages:
- libsqlite3-dev
install:
- go get github.com/gwenn/yacr
- go get -tags all github.com/gwenn/gosqlite
......
......@@ -7,6 +7,7 @@ package sqlite_test
import (
"strings"
"testing"
. "github.com/gwenn/gosqlite"
)
......
......@@ -36,6 +36,7 @@ import (
"fmt"
"math"
"reflect"
"strings"
"time"
"unsafe"
)
......@@ -109,7 +110,7 @@ func (c *Conn) prepare(sql string, args ...interface{}) (*Stmt, error) {
if tail != nil && *tail != '\000' {
t = C.GoString(tail)
}
s := &Stmt{c: c, stmt: stmt, tail: t, columnCount: -1, bindParameterCount: -1}
s := &Stmt{c: c, stmt: stmt, tail: strings.TrimSpace(t), columnCount: -1, bindParameterCount: -1}
if len(args) > 0 {
err := s.Bind(args...)
if err != 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