@@ -6,7 +6,6 @@ type HashCmdable interface {
66 HDel (ctx context.Context , key string , fields ... string ) * IntCmd
77 HExists (ctx context.Context , key , field string ) * BoolCmd
88 HGet (ctx context.Context , key , field string ) * StringCmd
9- HStrLen (ctx context.Context , key , field string ) * IntCmd
109 HGetAll (ctx context.Context , key string ) * MapStringStringCmd
1110 HIncrBy (ctx context.Context , key , field string , incr int64 ) * IntCmd
1211 HIncrByFloat (ctx context.Context , key , field string , incr float64 ) * FloatCmd
@@ -20,6 +19,7 @@ type HashCmdable interface {
2019 HVals (ctx context.Context , key string ) * StringSliceCmd
2120 HRandField (ctx context.Context , key string , count int ) * StringSliceCmd
2221 HRandFieldWithValues (ctx context.Context , key string , count int ) * KeyValueSliceCmd
22+ HStrLen (ctx context.Context , key , field string ) * IntCmd
2323}
2424
2525func (c cmdable ) HDel (ctx context.Context , key string , fields ... string ) * IntCmd {
@@ -46,12 +46,6 @@ func (c cmdable) HGet(ctx context.Context, key, field string) *StringCmd {
4646 return cmd
4747}
4848
49- func (c cmdable ) HStrLen (ctx context.Context , key , field string ) * IntCmd {
50- cmd := NewIntCmd (ctx , "hstrlen" , key , field )
51- _ = c (ctx , cmd )
52- return cmd
53- }
54-
5549func (c cmdable ) HGetAll (ctx context.Context , key string ) * MapStringStringCmd {
5650 cmd := NewMapStringStringCmd (ctx , "hgetall" , key )
5751 _ = c (ctx , cmd )
@@ -179,3 +173,9 @@ func (c cmdable) HScan(ctx context.Context, key string, cursor uint64, match str
179173 _ = c (ctx , cmd )
180174 return cmd
181175}
176+
177+ func (c cmdable ) HStrLen (ctx context.Context , key , field string ) * IntCmd {
178+ cmd := NewIntCmd (ctx , "hstrlen" , key , field )
179+ _ = c (ctx , cmd )
180+ return cmd
181+ }
0 commit comments