package main
import (
"fmt"
"html"
)
func main() {
str := `<b><i><u>nilpointer.net</u></i></b>`
result := html.EscapeString(str)
fmt.Println(result)
}
Output
<b><i><u>nilpointer.net</u></i></b>