1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2024-11-22 03:30:04 -05:00

Make marshalMessageSet() not a pointer receiver for Request

It doesn't even use the object
This commit is contained in:
Aaron Lindsay 2017-03-16 11:13:52 -04:00
parent 49cf745a20
commit f0b67bad85

8
ofx.go
View File

@ -127,7 +127,7 @@ type Request struct {
indent bool // Whether to indent the marshaled XML
}
func (oq *Request) marshalMessageSet(e *xml.Encoder, requests []Message, setname string) error {
func marshalMessageSet(e *xml.Encoder, requests []Message, setname string) error {
if len(requests) > 0 {
messageSetElement := xml.StartElement{Name: xml.Name{Local: setname}}
if err := e.EncodeToken(messageSetElement); err != nil {
@ -199,13 +199,13 @@ NEWFILEUID:NONE
return nil, err
}
if err := oq.marshalMessageSet(encoder, oq.Signup, "SIGNUPMSGSRQV1"); err != nil {
if err := marshalMessageSet(encoder, oq.Signup, "SIGNUPMSGSRQV1"); err != nil {
return nil, err
}
if err := oq.marshalMessageSet(encoder, oq.Banking, "BANKMSGSRQV1"); err != nil {
if err := marshalMessageSet(encoder, oq.Banking, "BANKMSGSRQV1"); err != nil {
return nil, err
}
if err := oq.marshalMessageSet(encoder, oq.Profile, "PROFMSGSRQV1"); err != nil {
if err := marshalMessageSet(encoder, oq.Profile, "PROFMSGSRQV1"); err != nil {
return nil, err
}