// ByteSliceFromString returns a NUL-terminated slice of bytes // containing the text of s. If s contains a NUL byte at any // location, it returns (nil, EINVAL). func ByteSliceFromString(s string) ([]byte, error) { … } // BytePtrFromString returns a pointer to a NUL-terminated array of // bytes containing the text of s. If s contains a NUL byte at any // location, it returns (nil, EINVAL). func BytePtrFromString(s string) (*byte, error) { … } // ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any // bytes after the NUL removed. func ByteSliceToString(s []byte) string { … } // BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. // If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated // at a zero byte; if the zero byte is not present, the program may crash. func BytePtrToString(p *byte) string { … } var _zero …