]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/xml: rename fInnerXml to fInnerXML
authorEddie Scholtz <escholtz@google.com>
Tue, 27 Aug 2019 19:33:45 +0000 (13:33 -0600)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 28 Aug 2019 10:21:40 +0000 (10:21 +0000)
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/+/191970
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/encoding/xml/marshal.go
src/encoding/xml/read.go
src/encoding/xml/typeinfo.go

index add5ece78211f101c63e29514fbdd9d3e360326f..e325f3137438ff6227b6399d0c3097959bf588f3 100644 (file)
@@ -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) {
index 12102bc804e4e0334d4b65603a32f3d63fbabfce..10a60eed1a903a5e60fbf5151bdef021a66cd9cd 100644 (file)
@@ -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 {
index 48de3d7e9e9cd2ee2d5cb19f6d5b6c076423ac62..639952c74adda7c13e5d3be3e59219eb79b8f9b0 100644 (file)
@@ -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
                        }