File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ func Marshal(iface interface{}) (bytes []byte, e error) {
2020 )
2121
2222 var (
23- operation * codecOperation
23+ operation codecOperation
2424 )
2525
2626 defer func () {
@@ -56,7 +56,7 @@ func Unmarshal(bytes []byte, iface interface{}) (e error) {
5656 )
5757
5858 var (
59- operation * codecOperation
59+ operation codecOperation
6060 )
6161
6262 defer func () {
Original file line number Diff line number Diff line change @@ -56,10 +56,8 @@ func (c *codec) formatMetadataFromTypeReflection(reflection reflect.Type) (
5656}
5757
5858func (c * codec ) newOperation (iface interface {}) (
59- operation * codecOperation , e error ,
59+ operation codecOperation , e error ,
6060) {
61- operation = new (codecOperation )
62-
6361 operation .format , e = c .formatMetadataFromTypeReflection (
6462 reflect .TypeOf (iface ),
6563 )
@@ -77,13 +75,13 @@ type codecOperation struct {
7775 valueReflection reflect.Value
7876}
7977
80- func (c * codecOperation ) marshal () (bytes []byte , e error ) {
78+ func (c codecOperation ) marshal () (bytes []byte , e error ) {
8179 bytes = c .format .marshal (c .valueReflection )
8280
8381 return
8482}
8583
86- func (c * codecOperation ) unmarshal (bytes []byte ) (e error ) {
84+ func (c codecOperation ) unmarshal (bytes []byte ) (e error ) {
8785 if len (bytes ) != c .format .lengthInBytes {
8886 e = validation .NewLengthOfByteSliceNotEqualToFormatLengthError (
8987 uint (c .format .lengthInBytes ),
You can’t perform that action at this time.
0 commit comments