Skip to content

Commit 45f24e9

Browse files
committed
code simplification from jmoiron#534 with slight tweak
1 parent 917b018 commit 45f24e9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sqlx.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ func isScannable(t reflect.Type) bool {
6464

6565
// it's not important that we use the right mapper for this particular object,
6666
// we're only concerned on how many exported fields this struct has
67-
m := mapper()
68-
if len(m.TypeMap(t).Index) == 0 {
69-
return true
70-
}
71-
return false
67+
return len(mapper().TypeMap(t).Index) == 0
7268
}
7369

7470
// ColScanner is an interface used by MapScan and SliceScan

0 commit comments

Comments
 (0)