@@ -83,7 +83,7 @@ func TestTransactionMarshalUnmarshalRoundtrip(t *testing.T) {
8383 }
8484
8585 // call unmarshal with a getNetwork func that should not be invoked
86- badGetNetwork := func (network string , channel string ) (* network. Network , error ) {
86+ badGetNetwork := func (network string , channel string ) (Network , error ) {
8787 t .Fatalf ("getNetwork should not be called" )
8888 return nil , nil
8989 }
@@ -125,7 +125,7 @@ func TestUnmarshal_ErrorCases(t *testing.T) {
125125 ser := TransactionSer {Network : "" , Namespace : "ns" }
126126 raw := m (ser )
127127 p := & Payload {Transient : map [string ][]byte {}, TokenRequest : token .NewRequest (nil , "" ), Envelope : & network.Envelope {}}
128- if err := unmarshal (func (network , channel string ) (* network. Network , error ) { return nil , nil }, p , raw ); ! errors .Is (err , ErrNetworkNotSet ) {
128+ if err := unmarshal (func (network , channel string ) (Network , error ) { return nil , nil }, p , raw ); ! errors .Is (err , ErrNetworkNotSet ) {
129129 t .Fatalf ("expected ErrNetworkNotSet, got %v" , err )
130130 }
131131 }
@@ -135,7 +135,7 @@ func TestUnmarshal_ErrorCases(t *testing.T) {
135135 ser := TransactionSer {Network : "net" , Namespace : "" }
136136 raw := m (ser )
137137 p := & Payload {Transient : map [string ][]byte {}, TokenRequest : token .NewRequest (nil , "" ), Envelope : & network.Envelope {}}
138- if err := unmarshal (func (network , channel string ) (* network. Network , error ) { return nil , nil }, p , raw ); ! errors .Is (err , ErrNamespaceNotSet ) {
138+ if err := unmarshal (func (network , channel string ) (Network , error ) { return nil , nil }, p , raw ); ! errors .Is (err , ErrNamespaceNotSet ) {
139139 t .Fatalf ("expected ErrNamespaceNotSet, got %v" , err )
140140 }
141141 }
@@ -145,7 +145,7 @@ func TestUnmarshal_ErrorCases(t *testing.T) {
145145 ser := TransactionSer {Network : "net" , Namespace : "ns" , Transient : []byte {1 , 2 , 3 }}
146146 raw := m (ser )
147147 p := & Payload {Transient : map [string ][]byte {}, TokenRequest : token .NewRequest (nil , "" ), Envelope : & network.Envelope {}}
148- err := unmarshal (func (network , channel string ) (* network. Network , error ) { return nil , nil }, p , raw )
148+ err := unmarshal (func (network , channel string ) (Network , error ) { return nil , nil }, p , raw )
149149 if err == nil || ! strings .Contains (err .Error (), "failed unmarshalling transient" ) {
150150 t .Fatalf ("expected transient unmarshal error, got %v" , err )
151151 }
@@ -156,7 +156,7 @@ func TestUnmarshal_ErrorCases(t *testing.T) {
156156 ser := TransactionSer {Network : "net" , Namespace : "ns" , TokenRequest : []byte {1 , 2 , 3 }}
157157 raw := m (ser )
158158 p := & Payload {Transient : map [string ][]byte {}, TokenRequest : token .NewRequest (nil , "" ), Envelope : & network.Envelope {}}
159- err := unmarshal (func (network , channel string ) (* network. Network , error ) { return nil , nil }, p , raw )
159+ err := unmarshal (func (network , channel string ) (Network , error ) { return nil , nil }, p , raw )
160160 if err == nil || ! strings .Contains (err .Error (), "failed unmarshalling token request" ) {
161161 t .Fatalf ("expected token request unmarshal error, got %v" , err )
162162 }
@@ -168,7 +168,7 @@ func TestUnmarshal_ErrorCases(t *testing.T) {
168168 raw := m (ser )
169169 p := & Payload {Transient : map [string ][]byte {}, TokenRequest : token .NewRequest (nil , "" ), Envelope : nil }
170170 expErr := errors .New ("no network" )
171- err := unmarshal (func (network , channel string ) (* network. Network , error ) { return nil , expErr }, p , raw )
171+ err := unmarshal (func (network , channel string ) (Network , error ) { return nil , expErr }, p , raw )
172172 if err == nil || ! strings .Contains (err .Error (), "no network" ) {
173173 t .Fatalf ("expected getNetwork error propagated, got %v" , err )
174174 }
0 commit comments