diff --git a/utils_test.go b/utils_test.go new file mode 100644 index 0000000..1a156df --- /dev/null +++ b/utils_test.go @@ -0,0 +1,16 @@ +package godzilla + +import "fmt" + +func ExampleGetString() { + b := []byte("ABC") + str := GetString(b) + fmt.Println(str) + fmt.Println(len(b) == len(str)) + + b = nil + str = GetString(b) + fmt.Println(str) + fmt.Println(len(b) == len(str)) + fmt.Println(len(str)) +}