From 6618e031a7b4ca0a3aa0b91083e1f933488a84b6 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 31 Mar 2017 15:30:10 -0400 Subject: [PATCH] Response: Use SignonRs.String() instead of a raw string --- response.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/response.go b/response.go index 976cced..267ea84 100644 --- a/response.go +++ b/response.go @@ -295,7 +295,7 @@ func ParseResponse(reader io.Reader) (*Response, error) { tok, err = nextNonWhitespaceToken(decoder) if err != nil { return nil, err - } else if signonStart, ok := tok.(xml.StartElement); ok && signonStart.Name.Local == "SIGNONMSGSRSV1" { + } else if signonStart, ok := tok.(xml.StartElement); ok && signonStart.Name.Local == SignonRs.String() { if err := decoder.Decode(&or.Signon); err != nil { return nil, err } @@ -306,7 +306,7 @@ func ParseResponse(reader io.Reader) (*Response, error) { tok, err = nextNonWhitespaceToken(decoder) if err != nil { return nil, err - } else if signonEnd, ok := tok.(xml.EndElement); !ok || signonEnd.Name.Local != "SIGNONMSGSRSV1" { + } else if signonEnd, ok := tok.(xml.EndElement); !ok || signonEnd.Name.Local != SignonRs.String() { return nil, errors.New("Missing closing SIGNONMSGSRSV1 xml element") } if ok, err := or.Signon.Valid(); !ok {