From cc74e7a67e7829c96af1bc3744524c3939919743 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sat, 29 Oct 2016 11:38:52 +0100 Subject: [PATCH] Use interface type for @thing TB --- sql/ast.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/ast.go b/sql/ast.go index 24c20aa3..26f6a351 100644 --- a/sql/ast.go +++ b/sql/ast.go @@ -441,7 +441,7 @@ func NewTable(TB string) *Table { // Thing comment type Thing struct { - TB string + TB interface{} ID interface{} } @@ -453,7 +453,7 @@ func (this Thing) MarshalText() (data []byte, err error) { return []byte(this.String()), err } -func NewThing(TB string, ID interface{}) *Thing { +func NewThing(TB interface{}, ID interface{}) *Thing { if str, ok := ID.(string); ok { if cnv, err := strconv.ParseFloat(str, 64); err == nil { if cnv == float64(int64(cnv)) {