wheat-cache/pkg/structure/define.go

30 lines
452 B
Go
Raw Normal View History

package structure
2021-09-24 22:48:08 +08:00
const (
defaultLen = 32 // 默认创建的 value 大小
)
2021-09-19 11:53:17 +08:00
2021-09-24 22:48:08 +08:00
type DynamicType int8
const (
DynamicNull = DynamicType(iota)
DynamicInt
DynamicFloat
DynamicString
)
type ResultConn struct {
Result []string
UpdateSize int64 // 操作以后发生变更的大小, 负数表示减小
}
func NewResult(s ...string) *ResultConn {
res := make([]string, len(s))
res = append(res, s...)
return &ResultConn{
Result: res,
}
}