diff --git a/database/t_base.go b/database/t_base.go index c650cf3..257abae 100644 --- a/database/t_base.go +++ b/database/t_base.go @@ -7,13 +7,13 @@ var ( _ TBase = (*encodings.StringInt)(nil) _ TBase = (*encodings.StringEmb)(nil) - _ TList = (*encodings.ListLinkedList)(nil) + _ TBase = (*encodings.ListLinkedList)(nil) - _ THash = (*encodings.HashDict)(nil) + _ TBase = (*encodings.HashDict)(nil) - _ TSet = (*encodings.HashSet)(nil) + _ TBase = (*encodings.HashSet)(nil) - _ TZSet = (*encodings.SortedSet)(nil) + _ TBase = (*encodings.SortedSet)(nil) ) type TBase interface { diff --git a/database/t_hash.go b/database/t_hash.go index b60641b..3f63836 100644 --- a/database/t_hash.go +++ b/database/t_hash.go @@ -5,6 +5,7 @@ import ( ) var ( + // hash对象的实现方式 _ THash = (*encodings.HashDict)(nil) ) diff --git a/database/t_list.go b/database/t_list.go index 247ca36..e3e2a3d 100644 --- a/database/t_list.go +++ b/database/t_list.go @@ -3,6 +3,7 @@ package database import "redis_go/encodings" var ( + // list对象的实现方式 _ TList = (*encodings.ListLinkedList)(nil) ) diff --git a/database/t_set.go b/database/t_set.go index ff506a6..1825e87 100644 --- a/database/t_set.go +++ b/database/t_set.go @@ -3,6 +3,7 @@ package database import "redis_go/encodings" var ( + // set对象的实现方式 _ TSet = (*encodings.HashSet)(nil) ) diff --git a/database/t_string.go b/database/t_string.go index 353dfab..e69fd7b 100644 --- a/database/t_string.go +++ b/database/t_string.go @@ -5,6 +5,7 @@ import ( ) var ( + // string对象的三种实现方式 _ TString = (*encodings.StringRaw)(nil) _ TString = (*encodings.StringInt)(nil) _ TString = (*encodings.StringEmb)(nil) diff --git a/database/t_zset.go b/database/t_zset.go index a5dab35..6187c2f 100644 --- a/database/t_zset.go +++ b/database/t_zset.go @@ -3,6 +3,7 @@ package database import "redis_go/encodings" var ( + // zset对象的实现方式 _ TZSet = (*encodings.SortedSet)(nil) )