- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for CopyToken (0.12 sec)
-
src/encoding/xml/xml_test.go
var tok1 Token = elt tok2 := CopyToken(tok1) if tok1.(StartElement).Attr[0].Value != "en" { t.Error("CopyToken overwrote Attr[0]") } if !reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(StartElement) != StartElement") } tok1.(StartElement).Attr[0] = Attr{Name{"", "lang"}, "de"} if reflect.DeepEqual(tok1, tok2) { t.Error("CopyToken(CharData) uses same buffer.") } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 36.9K bytes - Viewed (0) -
src/encoding/xml/xml.go
// The bytes do not include the <! and > markers. type Directive []byte // Copy creates a new copy of Directive. func (d Directive) Copy() Directive { return Directive(bytes.Clone(d)) } // CopyToken returns a copy of a Token. func CopyToken(t Token) Token { switch v := t.(type) { case CharData: return v.Copy() case Comment: return v.Copy() case Directive: return v.Copy() case ProcInst:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 47.3K bytes - Viewed (0)