How To Convert a Zero-Terminated Byte Array to a String in Go The Problem When working with C libraries or system calls in Go, you encounter a zero-terminated byte array.