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

Method WriteTo

xmlparser/tokens.go:110–121  ·  view source on GitHub ↗

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

(w TokenWriter)

Source from the content-addressed store, hash-verified

108
109// WriteTo writes the XML representation of the directive to the provided writer.
110func (d *Directive) WriteTo(w TokenWriter) error {
111 if _, err := w.WriteString("<!DOCTYPE"); err != nil {
112 return err
113 }
114 if _, err := w.Write(d.Data); err != nil {
115 return err
116 }
117 if err := w.WriteByte('>'); err != nil {
118 return err
119 }
120 return nil
121}
122
123// Comment represents a comment token (e.g., <!-- comment -->).
124// When obtained from [Decoder], the bytes in the Data field are actual only

Callers

nothing calls this directly

Calls 2

WriteByteMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected