ledisdb/store/driver/slice.go

22 lines
230 B
Go
Raw Permalink Normal View History

2014-10-29 05:29:50 +03:00
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() {
}