package main
import (
"encoding/hex"
"fmt"
)
func main() {
str := "nilpointer.net"
result := hex.EncodeToString([]byte(str))
fmt.Println(result)
}
Output
6e696c706f696e7465722e6e6574
package main
import (
"encoding/hex"
"fmt"
)
func main() {
str := "nilpointer.net"
result := hex.EncodeToString([]byte(str))
fmt.Println(result)
}
6e696c706f696e7465722e6e6574