Golang encoding/xml.ProcInst.Copy() function example
package encoding/xml
Golang encoding/xml.ProcInst.Copy() function usage example
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:
return v.Copy() // <-- here
case StartElement:
return v.Copy()
}
return t
}
Reference :
Advertisement
Something interesting
Tutorials
+31.7k Golang : How to convert(cast) string to IP address?
+11.6k Golang : Convert(cast) float to int
+17k Golang : Fix cannot convert buffer (type *bytes.Buffer) to type string error
+17.6k Golang : Upload/Receive file progress indicator
+23.5k Golang : Check if element exist in map
+24k Golang : Call function from another package
+28.6k Get file path of temporary file in Go
+17.5k Golang : Linked list example
+5.4k Golang : Qt update UI elements with core.QCoreApplication_ProcessEvents
+20.2k Golang : Count number of digits from given integer value
+80.7k Golang : How to return HTTP status code?
+15.6k Golang : rune literal not terminated error