mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 19:00:55 +00:00
22 lines
230 B
Go
22 lines
230 B
Go
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() {
|
|
|
|
}
|