mirror of
https://github.com/jimeh/go-render.git
synced 2026-02-19 11:26:39 +00:00
refactor!: sizeable changes across the board
This commit is contained in:
4
xml.go
4
xml.go
@@ -21,7 +21,7 @@ type XML struct {
|
||||
Indent string
|
||||
}
|
||||
|
||||
var _ Renderer = (*XML)(nil)
|
||||
var _ FormatRenderer = (*XML)(nil)
|
||||
|
||||
// Render marshals the given value to XML.
|
||||
func (x *XML) Render(w io.Writer, v any) error {
|
||||
@@ -38,7 +38,7 @@ func (x *XML) Render(w io.Writer, v any) error {
|
||||
|
||||
err := enc.Encode(v)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%w: %w", Err, err)
|
||||
return fmt.Errorf("%w: %w", ErrFailed, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user