mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-14 07:30:25 +08:00
KV存储增加panic处理
This commit is contained in:
@@ -60,6 +60,10 @@ func (this *Table[T]) SetDB(db *DB) {
|
||||
this.db = db
|
||||
}
|
||||
|
||||
func (this *Table[T]) DB() *DB {
|
||||
return this.db
|
||||
}
|
||||
|
||||
func (this *Table[T]) Set(key string, value T) error {
|
||||
if len(key) > KeyMaxLength {
|
||||
return ErrKeyTooLong
|
||||
|
||||
Reference in New Issue
Block a user