MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / WriteTo

Method WriteTo

xmlparser/tokens.go:204–219  ·  view source on GitHub ↗

WriteTo writes the XML representation of the text to the provided writer.

(w TokenWriter)

Source from the content-addressed store, hash-verified

202
203// WriteTo writes the XML representation of the text to the provided writer.
204func (t *Text) WriteTo(w TokenWriter) error {
205 if t.CData {
206 if _, err := w.WriteString("<![CDATA["); err != nil {
207 return err
208 }
209 }
210 if _, err := w.Write(t.Data); err != nil {
211 return err
212 }
213 if t.CData {
214 if _, err := w.WriteString("]]>"); err != nil {
215 return err
216 }
217 }
218 return nil
219}

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected