@@ -11,7 +11,7 @@ import (
1111type Model struct {
1212 Str1 string `redis:"str1"`
1313 Str2 string `redis:"str2"`
14- Bytes1 []byte `redis:"bytes1 "`
14+ Bytes []byte `redis:"bytes "`
1515 Int int `redis:"int"`
1616 Bool bool `redis:"bool"`
1717 Ignored struct {} `redis:"-"`
@@ -31,7 +31,7 @@ func main() {
3131 rdb .HSet (ctx , "key" , "str2" , "world" )
3232 rdb .HSet (ctx , "key" , "int" , 123 )
3333 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 !" ))
3535 return nil
3636 }); err != nil {
3737 panic (err )
@@ -54,7 +54,7 @@ func main() {
5454 // (main.Model) {
5555 // Str1: (string) (len=5) "hello",
5656 // Str2: (string) (len=5) "world",
57- // Bytes1 : ([]uint8) (len=15 cap=16) {
57+ // Bytes : ([]uint8) (len=15 cap=16) {
5858 // 00000000 74 68 69 73 20 69 73 20 62 79 74 65 73 20 21 |this is bytes !|
5959 // },
6060 // Int: (int) 123,
@@ -68,11 +68,10 @@ func main() {
6868 // (main.Model) {
6969 // Str1: (string) (len=5) "hello",
7070 // Str2: (string) "",
71- // Bytes1 : ([]uint8) <nil>,
71+ // Bytes : ([]uint8) <nil>,
7272 // Int: (int) 123,
7373 // Bool: (bool) false,
7474 // Ignored: (struct {}) {
7575 // }
7676 // }
77-
7877}
0 commit comments