From 8ecd77c707d698b39fbcf76e4e8d08f284c8307f Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 1 Dec 2016 12:12:18 +0900 Subject: [PATCH] fix test see https://github.com/golang/go/issues/18099 --- sqlite3_go18_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlite3_go18_test.go b/sqlite3_go18_test.go index 54e6604..f95f9bc 100644 --- a/sqlite3_go18_test.go +++ b/sqlite3_go18_test.go @@ -29,12 +29,12 @@ func TestNamedParams(t *testing.T) { t.Error("Failed to call db.Query:", err) } - _, err = db.Exec(`insert into foo(id, name, extra) values(:id, :name, :name)`, sql.Param(":name", "foo"), sql.Param(":id", 1)) + _, err = db.Exec(`insert into foo(id, name, extra) values(:id, :name, :name)`, sql.Named(":name", "foo"), sql.Named(":id", 1)) if err != nil { t.Error("Failed to call db.Exec:", err) } - row := db.QueryRow(`select id, extra from foo where id = :id and extra = :extra`, sql.Param(":id", 1), sql.Param(":extra", "foo")) + row := db.QueryRow(`select id, extra from foo where id = :id and extra = :extra`, sql.Named(":id", 1), sql.Named(":extra", "foo")) if row == nil { t.Error("Failed to call db.QueryRow") }