blob: 1eaf071341af3fe4654542ddc27cd96c6765626b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package proto
import "github.com/go-faster/errors"
type TableColumns struct {
First string
Second string
}
func (c *TableColumns) DecodeAware(r *Reader, _ int) error {
{
v, err := r.Str()
if err != nil {
return errors.Wrap(err, "first")
}
c.First = v
}
{
v, err := r.Str()
if err != nil {
return errors.Wrap(err, "second")
}
c.Second = v
}
return nil
}
func (c TableColumns) EncodeAware(b *Buffer, _ int) {
ServerCodeTableColumns.Encode(b)
b.PutString(c.First)
b.PutString(c.Second)
}
|