From 27a88ca7035be5c88da3d9d7f67c5be7a736de2d Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Sat, 25 Mar 2017 06:23:30 -0400 Subject: [PATCH] Make Decode*MessageSet functions private to the library These don't need to be exposed and clutter the auto-generated documentation --- banking.go | 2 +- creditcards.go | 2 +- investments.go | 2 +- profile.go | 2 +- response.go | 12 ++++++------ securities.go | 2 +- signup.go | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/banking.go b/banking.go index 17f63b7..23413dd 100644 --- a/banking.go +++ b/banking.go @@ -151,7 +151,7 @@ func (sr StatementResponse) Valid() (bool, error) { return true, nil } -func DecodeBankingMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeBankingMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d) diff --git a/creditcards.go b/creditcards.go index 0c42717..d1663de 100644 --- a/creditcards.go +++ b/creditcards.go @@ -58,7 +58,7 @@ func (sr CCStatementResponse) Valid() (bool, error) { return true, nil } -func DecodeCCMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeCCMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d) diff --git a/investments.go b/investments.go index 7abcda6..f77a011 100644 --- a/investments.go +++ b/investments.go @@ -713,7 +713,7 @@ func (sr InvStatementResponse) Valid() (bool, error) { return true, nil } -func DecodeInvestmentsMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeInvestmentsMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d) diff --git a/profile.go b/profile.go index 857b7c3..f2e3087 100644 --- a/profile.go +++ b/profile.go @@ -126,7 +126,7 @@ func (pr ProfileResponse) Valid() (bool, error) { return true, nil } -func DecodeProfileMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeProfileMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d) diff --git a/response.go b/response.go index bd96039..0aa90d9 100644 --- a/response.go +++ b/response.go @@ -258,26 +258,26 @@ func ParseResponse(reader io.Reader) (*Response, error) { // TODO decode other types switch start.Name.Local { case "SIGNUPMSGSRSV1": - msgs, err := DecodeSignupMessageSet(decoder, start) + msgs, err := decodeSignupMessageSet(decoder, start) if err != nil { return nil, err } or.Signup = msgs case "BANKMSGSRSV1": - msgs, err := DecodeBankingMessageSet(decoder, start) + msgs, err := decodeBankingMessageSet(decoder, start) if err != nil { return nil, err } or.Banking = msgs case "CREDITCARDMSGSRSV1": - msgs, err := DecodeCCMessageSet(decoder, start) + msgs, err := decodeCCMessageSet(decoder, start) if err != nil { return nil, err } or.CreditCards = msgs //case "LOANMSGSRSV1": case "INVSTMTMSGSRSV1": - msgs, err := DecodeInvestmentsMessageSet(decoder, start) + msgs, err := decodeInvestmentsMessageSet(decoder, start) if err != nil { return nil, err } @@ -287,7 +287,7 @@ func ParseResponse(reader io.Reader) (*Response, error) { //case "BILLPAYMSGSRSV1": //case "EMAILMSGSRSV1": case "SECLISTMSGSRSV1": - msgs, err := DecodeSecuritiesMessageSet(decoder, start) + msgs, err := decodeSecuritiesMessageSet(decoder, start) if err != nil { return nil, err } @@ -295,7 +295,7 @@ func ParseResponse(reader io.Reader) (*Response, error) { //case "PRESDIRMSGSRSV1": //case "PRESDLVMSGSRSV1": case "PROFMSGSRSV1": - msgs, err := DecodeProfileMessageSet(decoder, start) + msgs, err := decodeProfileMessageSet(decoder, start) if err != nil { return nil, err } diff --git a/securities.go b/securities.go index 2c43e7b..2bc20da 100644 --- a/securities.go +++ b/securities.go @@ -227,7 +227,7 @@ func (r *SecurityList) UnmarshalXML(d *xml.Decoder, start xml.StartElement) erro } } -func DecodeSecuritiesMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeSecuritiesMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d) diff --git a/signup.go b/signup.go index 9c3de77..9815bcb 100644 --- a/signup.go +++ b/signup.go @@ -122,7 +122,7 @@ func (air AcctInfoResponse) Valid() (bool, error) { return true, nil } -func DecodeSignupMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { +func decodeSignupMessageSet(d *xml.Decoder, start xml.StartElement) ([]Message, error) { var msgs []Message for { tok, err := nextNonWhitespaceToken(d)