We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0381e44 commit 22d937cCopy full SHA for 22d937c
1 file changed
struct_test.go
@@ -328,13 +328,14 @@ func (rows testRows) Close() error {
328
}
329
330
func (rows testRows) Scan(dest ...interface{}) error {
331
- if rows == 0 {
+ switch rows {
332
+ case 0:
333
fmt.Sscan("1234 huandu 1", dest...)
- } else if rows == 1 {
334
+ case 1:
335
fmt.Sscan("1234 34 huandu 1456725903636000000", dest...)
- } else if rows == 2 {
336
+ case 2:
337
fmt.Sscan("1 1456725903636000000", dest...)
- } else {
338
+ default:
339
panic("invalid rows")
340
341
0 commit comments