Example #1
0
func emptyKeyError() error {
	return util.ErrorSkipFrames(1, "attempted access to empty key")
}
Example #2
0
// charToErr converts a *C.char to an error, freeing the given
// C string in the process.
func charToErr(c *C.char) error {
	s := C.GoString(c)
	C.free(unsafe.Pointer(c))
	return util.ErrorSkipFrames(1, s)
}