Skip to content

Commit

Permalink
Fix Parameter.SetValue for time.Time
Browse files Browse the repository at this point in the history
  • Loading branch information
lxn committed Feb 21, 2012
1 parent 7100812 commit 88a1721
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conn_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (conn *Conn) writeBind(stmt *Statement) {
values[i] = val.Format("2006-01-02 15:04:05")

default:
panic("invalid use of *time.Time")
panic("invalid use of time.Time")
}

default:
Expand Down
4 changes: 1 addition & 3 deletions parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ func (p *Parameter) SetValue(v interface{}) (err error) {
return
}

t := &time.Time{}
*t = val
p.value = t
p.value = val

case uint64:
p.value = val
Expand Down

0 comments on commit 88a1721

Please sign in to comment.