package str import ( "fmt" "testing" ) func TestHexEncode(t *testing.T) { fmt.Println(StrTool.HexEncode("hello world!")) //68656c6c6f20776f726c6421 } func TestHexDecode(t *testing.T) { fmt.Println(StrTool.HexDecode("68656c6c6f20776f726c6421")) //hello world! }