Use interface type for @thing TB
This commit is contained in:
parent
abf9c937be
commit
cc74e7a67e
1 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue