panic: reflect.Set: value of type string is not assignable to type main.SpecialString
goroutine 1 [running]:
runtime.panic(0x409fa00, 0xc21000a270)
/usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
reflect.Value.assignTo(0x409fa00, 0xc21000a260, 0x182, 0x40e2410, 0xb, ...)
/usr/local/go/src/pkg/reflect/value.go:2198 +0x312
reflect.Value.Set(0x409f940, 0xc21000a210, 0x186, 0x409fa00, 0xc21000a260, ...)
/usr/local/go/src/pkg/reflect/value.go:1385 +0x9b
database/sql.convertAssign(0x4097440, 0xc21000a210, 0x409fa00, 0xc21000a260, 0x401eb71, ...)
/usr/local/go/src/pkg/database/sql/convert.go:215 +0x830
database/sql.(*Rows).Scan(0xc210039120, 0x45b1e78, 0x1, 0x1, 0x0, ...)
/usr/local/go/src/pkg/database/sql/sql.go:1562 +0x2d5
database/sql.(*Row).Scan(0xc2100510a0, 0x45b1e78, 0x1, 0x1, 0x0, ...)
/usr/local/go/src/pkg/database/sql/sql.go:1630 +0x200
main.main()
/Users/krolaw/Dropbox/go/src/websync/sqlfail.go:34 +0x57c
goroutine 4 [syscall]:
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1394
exit status 2
Since Scan returns an error, if there's a problem, it seems odd that it's panicking, so I'm wondering if this is a bug.
Also, in my real code, the variable passed to Scan provides methods for a specified interface (hence the type based on a string and not a string itself), and it would add extra complexity if I had to unbox such variables for the purpose of Scan.
Thanks in advance.