forked from mirror/ledisdb
add go slice
This commit is contained in:
parent
8d16ac54c5
commit
522d94e31e
|
@ -0,0 +1,21 @@
|
|||
package driver
|
||||
|
||||
type ISlice interface {
|
||||
Data() []byte
|
||||
Size() int
|
||||
Free()
|
||||
}
|
||||
|
||||
type GoSlice []byte
|
||||
|
||||
func (s GoSlice) Data() []byte {
|
||||
return []byte(s)
|
||||
}
|
||||
|
||||
func (s GoSlice) Size() int {
|
||||
return len(s)
|
||||
}
|
||||
|
||||
func (s GoSlice) Free() {
|
||||
|
||||
}
|
Loading…
Reference in New Issue