Commit 37373592 authored by Eddie Scholtz's avatar Eddie Scholtz Committed by Daniel Martí

encoding/xml: rename fInnerXml to fInnerXML

Per the code review guidelines: "Words in names that are
initialisms or acronyms have a consistent case."

Change-Id: I347b02d2f48455f2cbbc040191ba197e3e8f23fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/191970Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 5ff12f62
......@@ -914,7 +914,7 @@ func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error {
p.WriteString("-->")
continue
case fInnerXml:
case fInnerXML:
vf = indirect(vf)
iface := vf.Interface()
switch raw := iface.(type) {
......
......@@ -491,7 +491,7 @@ func (d *Decoder) unmarshal(val reflect.Value, start *StartElement) error {
saveAny = finfo.value(sv)
}
case fInnerXml:
case fInnerXML:
if !saveXML.IsValid() {
saveXML = finfo.value(sv)
if d.saved == nil {
......
......@@ -33,13 +33,13 @@ const (
fAttr
fCDATA
fCharData
fInnerXml
fInnerXML
fComment
fAny
fOmitEmpty
fMode = fElement | fAttr | fCDATA | fCharData | fInnerXml | fComment | fAny
fMode = fElement | fAttr | fCDATA | fCharData | fInnerXML | fComment | fAny
xmlName = "XMLName"
)
......@@ -134,7 +134,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro
case "chardata":
finfo.flags |= fCharData
case "innerxml":
finfo.flags |= fInnerXml
finfo.flags |= fInnerXML
case "comment":
finfo.flags |= fComment
case "any":
......@@ -149,7 +149,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro
switch mode := finfo.flags & fMode; mode {
case 0:
finfo.flags |= fElement
case fAttr, fCDATA, fCharData, fInnerXml, fComment, fAny, fAny | fAttr:
case fAttr, fCDATA, fCharData, fInnerXML, fComment, fAny, fAny | fAttr:
if f.Name == xmlName || tag != "" && mode != fAttr {
valid = false
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment