From 2fb5fea7fb9838c08c085d7fd4f08838b99d2d0a Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 11 Jun 2025 02:19:30 +0100 Subject: [PATCH] fix(xml)!: correct spelling of XMLDefaultIndent (#6) Fixes typo in variable name and references from 'XMLDefualtIndent' to 'XMLDefaultIndent'. Updates the variable declaration and all references to maintain consistency throughout the XML renderer implementation. BREAKING CHANGE: Rename `XMLDefualtIndent` to correctly spelled `XMLDefaultIndent`. --- xml.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml.go b/xml.go index 9d14bfb..b14654d 100644 --- a/xml.go +++ b/xml.go @@ -6,9 +6,9 @@ import ( "io" ) -// XMLDefualtIndent is the default indentation string used by XML instances when +// XMLDefaultIndent is the default indentation string used by XML instances when // pretty rendering if no Indent value is set. -var XMLDefualtIndent = " " +var XMLDefaultIndent = " " // XML is a Renderer that marshals a value to XML. type XML struct { @@ -17,7 +17,7 @@ type XML struct { Prefix string // Indent is the string added to each level of indentation when pretty - // rendering. If empty, XMLDefualtIndent be used. + // rendering. If empty, XMLDefaultIndent will be used. Indent string } @@ -43,7 +43,7 @@ func (x *XML) RenderPretty(w io.Writer, v any) error { prefix := x.Prefix indent := x.Indent if indent == "" { - indent = XMLDefualtIndent + indent = XMLDefaultIndent } enc := xml.NewEncoder(w)