From be67cb39779ed2fe28e10055d054711940949956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Sun, 17 Jan 2016 23:47:43 +0100 Subject: [PATCH] Use pointer receiver in user schema --- storage/schema_gen.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/schema_gen.go b/storage/schema_gen.go index 1bed9706..ee6675af 100644 --- a/storage/schema_gen.go +++ b/storage/schema_gen.go @@ -632,7 +632,7 @@ func (z *User) DecodeMsg(dc *msgp.Reader) (err error) { } // EncodeMsg implements msgp.Encodable -func (z User) EncodeMsg(en *msgp.Writer) (err error) { +func (z *User) EncodeMsg(en *msgp.Writer) (err error) { // map header, size 2 // write "ID" err = en.Append(0x82, 0xa2, 0x49, 0x44) @@ -656,7 +656,7 @@ func (z User) EncodeMsg(en *msgp.Writer) (err error) { } // MarshalMsg implements msgp.Marshaler -func (z User) MarshalMsg(b []byte) (o []byte, err error) { +func (z *User) MarshalMsg(b []byte) (o []byte, err error) { o = msgp.Require(b, z.Msgsize()) // map header, size 2 // string "ID" @@ -705,7 +705,7 @@ func (z *User) UnmarshalMsg(bts []byte) (o []byte, err error) { return } -func (z User) Msgsize() (s int) { +func (z *User) Msgsize() (s int) { s = 1 + 3 + msgp.Uint64Size + 9 + msgp.StringPrefixSize + len(z.Username) return }