Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _posts/2015-06-12-scanner-valuer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ sql: Scan error on column index 1: unsupported driver -> Scan pair: int64 -> *ma
I am sorry, your scanning failed...better luck next time!
{% endhighlight %}

Shucks. I guess we need some glue to make database/sql understand how to put the value from the database into our data structure. That glue is the scanner interface. Much like the Valuer interface, we need to perform some conversions to get the data from the database into our structures. Below is our implementation of a valuer for our YesNoEnum type:
Shucks. I guess we need some glue to make database/sql understand how to put the value from the database into our data structure. That glue is the scanner interface. Much like the Valuer interface, we need to perform some conversions to get the data from the database into our structures. Below is our implementation of a scanner for our YesNoEnum type:

{% highlight go %}

Expand Down