Created
October 1, 2018 21:24
-
-
Save berfarah/3ab51413a2628110c76287186c82eb6a to your computer and use it in GitHub Desktop.
Iterative Optimization on Hot Paths: Planning it out: Wrangling Go interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Descriptor struct { | |
Tags TagSet // struct tags | |
Type reflect.Type // the original type | |
Kind reflect.Kind // the underlying kind | |
Ptr bool // whether or not it's a ptr | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For a given column: | |
var valuer driver.Valuer = column.Descriptor.Valuer(reflect.ValueOf("")) | |
var scanner sql.Scanner = column.Descriptor.Scanner() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment