MCPcopy
hub / github.com/OpenListTeam/OpenList / equalXML

Method equalXML

server/webdav/xml_test.go:882–894  ·  view source on GitHub ↗

equalXML tests for equality of the normalized XML contents of a and b.

(a, b io.Reader)

Source from the content-addressed store, hash-verified

880
881// equalXML tests for equality of the normalized XML contents of a and b.
882func (n *xmlNormalizer) equalXML(a, b io.Reader) (bool, error) {
883 var buf bytes.Buffer
884 if err := n.normalize(&buf, a); err != nil {
885 return false, err
886 }
887 normA := buf.String()
888 buf.Reset()
889 if err := n.normalize(&buf, b); err != nil {
890 return false, err
891 }
892 normB := buf.String()
893 return normA == normB, nil
894}
895
896type byName []ixml.Attr
897

Callers 2

TestMultistatusWriterFunction · 0.95
TestUnmarshalXMLValueFunction · 0.95

Calls 3

normalizeMethod · 0.95
StringMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected