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
+18.5k Golang : Set, Get and List environment variables
+39.6k Golang : Remove dashes(or any character) from string
+8.9k Golang : Sort lines of text example
+5.6k Python : Print unicode escape characters and string
+8.6k Golang : Convert(cast) []byte to io.Reader type
+10.1k Golang : How to tokenize source code with text/scanner package?
+6.7k Golang : Check if password length meet the requirement
+7.2k Golang : Check if one string(rune) is permutation of another string(rune)
+13.9k Golang : How to determine if a year is leap year?
+8.3k Golang : Configure Apache and NGINX to access your Go service example
+7.4k Golang : Example of custom handler for Gorilla's Path usage.
+10.2k Golang : How to get quoted string into another string?