You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, I think that all of these examples panic, as the db *sql.DB variable is not initialized anywhere (normally in your code, you'd use something like db, err := sql.Open(...)).
Basically, none of these examples contain //Output comments, so they're probably meant to be compiled and displayed in the documentation, but not to be runnable.
Whoops, you're right they do all panic. I dug a little more and found that #9679 already addresses the overall problem (and a comment specifically notes the sql examples), so closing this as a duplicate.
What did you do?
Ran the example under the
sql.Rows
type at https://golang.org/pkg/database/sql/#Rows.Scan.What did you expect to see?
Logged output from the call:
What did you see instead?
A panic:
The text was updated successfully, but these errors were encountered: