4 ms·
Interesting comments (in mysql.go) : // Muahahaha func strlen(str *C.char) int { gstr := (*[1 << 30]byte)(unsafe.Pointer(str))
by canop_fr 15y ago
Interesting comments (in mysql.go) :
// Muahahaha
func strlen(str *C.char) int {
gstr := (*[1 << 30]byte)(unsafe.Pointer(str))
length := 0
for gstr[length] != 0 {
length++
}
return length
}
BTW, is Google planning to make a proper mysql driver in go (implementing database/sql API and not unsafe) ?
- enneff 15y agoHere's a list of database/sql drivers: http://code.google.com/p/go-wiki/wiki/SQLDrivers http://code.google.com/p/go-wiki/wiki/SQLDrivers
- canop_fr 15y agoYes, that's the driver I'm using. But my question was related to the fact that Google seems to have made (see source) a partial mysql driver, so I was wondering if they were planning to make it database/sql compatible.