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 { ...@@ -914,7 +914,7 @@ func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error {
p.WriteString("-->") p.WriteString("-->")
continue continue
case fInnerXml: case fInnerXML:
vf = indirect(vf) vf = indirect(vf)
iface := vf.Interface() iface := vf.Interface()
switch raw := iface.(type) { switch raw := iface.(type) {
......
...@@ -491,7 +491,7 @@ func (d *Decoder) unmarshal(val reflect.Value, start *StartElement) error { ...@@ -491,7 +491,7 @@ func (d *Decoder) unmarshal(val reflect.Value, start *StartElement) error {
saveAny = finfo.value(sv) saveAny = finfo.value(sv)
} }
case fInnerXml: case fInnerXML:
if !saveXML.IsValid() { if !saveXML.IsValid() {
saveXML = finfo.value(sv) saveXML = finfo.value(sv)
if d.saved == nil { if d.saved == nil {
......
...@@ -33,13 +33,13 @@ const ( ...@@ -33,13 +33,13 @@ const (
fAttr fAttr
fCDATA fCDATA
fCharData fCharData
fInnerXml fInnerXML
fComment fComment
fAny fAny
fOmitEmpty fOmitEmpty
fMode = fElement | fAttr | fCDATA | fCharData | fInnerXml | fComment | fAny fMode = fElement | fAttr | fCDATA | fCharData | fInnerXML | fComment | fAny
xmlName = "XMLName" xmlName = "XMLName"
) )
...@@ -134,7 +134,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro ...@@ -134,7 +134,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro
case "chardata": case "chardata":
finfo.flags |= fCharData finfo.flags |= fCharData
case "innerxml": case "innerxml":
finfo.flags |= fInnerXml finfo.flags |= fInnerXML
case "comment": case "comment":
finfo.flags |= fComment finfo.flags |= fComment
case "any": case "any":
...@@ -149,7 +149,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro ...@@ -149,7 +149,7 @@ func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, erro
switch mode := finfo.flags & fMode; mode { switch mode := finfo.flags & fMode; mode {
case 0: case 0:
finfo.flags |= fElement 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 { if f.Name == xmlName || tag != "" && mode != fAttr {
valid = false 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