bytesconv
v1.12.0
github.com/gin-gonic/gin/internal/bytesconv
Documentation
pkg.go.dev ↗Functions
BytesToString
func BytesToString(b []byte) string
BytesToString converts byte slice to string without a memory allocation. For more details, see https://github.com/golang/go/issues/53003#issuecomment-1140276077.
StringToBytes
func StringToBytes(s string) []byte
StringToBytes converts string to byte slice without a memory allocation. For more details, see https://github.com/golang/go/issues/53003#issuecomment-1140276077.