~samwhited/xmpp

b8f536ae5a69c66120d4d1c4f8a8823539c0137e — Sam Whited 4 years ago 12f86fd
stanza: fix unhandled error

Also fix unused ok value to make the linter shut up
1 files changed, 2 insertions(+), 3 deletions(-)

M stanza/error.go
M stanza/error.go => stanza/error.go +2 -3
@@ 309,8 309,7 @@ func (se Error) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error) {
			return err
		}
	}
	e.EncodeToken(start.End())
	return nil
	return e.EncodeToken(start.End())
}

// UnmarshalXML satisfies the xml.Unmarshaler interface for StanzaError.


@@ 349,6 348,6 @@ func (se *Error) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
	}
	tag, _, _ := language.NewMatcher(tags).Match(se.Lang)
	se.Lang = tag
	se.Text, _ = data[tag]
	se.Text = data[tag]
	return nil
}