@@ -11,7 +11,7 @@ import (
11
11
type Model struct {
12
12
Str1 string `redis:"str1"`
13
13
Str2 string `redis:"str2"`
14
- Bytes1 []byte `redis:"bytes1 "`
14
+ Bytes []byte `redis:"bytes "`
15
15
Int int `redis:"int"`
16
16
Bool bool `redis:"bool"`
17
17
Ignored struct {} `redis:"-"`
@@ -31,7 +31,7 @@ func main() {
31
31
rdb .HSet (ctx , "key" , "str2" , "world" )
32
32
rdb .HSet (ctx , "key" , "int" , 123 )
33
33
rdb .HSet (ctx , "key" , "bool" , 1 )
34
- rdb .HSet (ctx , "key" , "bytes1 " , []byte ("this is bytes !" ))
34
+ rdb .HSet (ctx , "key" , "bytes " , []byte ("this is bytes !" ))
35
35
return nil
36
36
}); err != nil {
37
37
panic (err )
@@ -54,7 +54,7 @@ func main() {
54
54
// (main.Model) {
55
55
// Str1: (string) (len=5) "hello",
56
56
// Str2: (string) (len=5) "world",
57
- // Bytes1 : ([]uint8) (len=15 cap=16) {
57
+ // Bytes : ([]uint8) (len=15 cap=16) {
58
58
// 00000000 74 68 69 73 20 69 73 20 62 79 74 65 73 20 21 |this is bytes !|
59
59
// },
60
60
// Int: (int) 123,
@@ -68,11 +68,10 @@ func main() {
68
68
// (main.Model) {
69
69
// Str1: (string) (len=5) "hello",
70
70
// Str2: (string) "",
71
- // Bytes1 : ([]uint8) <nil>,
71
+ // Bytes : ([]uint8) <nil>,
72
72
// Int: (int) 123,
73
73
// Bool: (bool) false,
74
74
// Ignored: (struct {}) {
75
75
// }
76
76
// }
77
-
78
77
}
0 commit comments