MCPcopy Create free account
hub / github.com/buger/jsonparser / bytesToString

Function bytesToString

bytes_unsafe.go:32–34  ·  view source on GitHub ↗

A hack until issue golang/go#2632 is fixed. See: https://github.com/golang/go/issues/2632

(b *[]byte)

Source from the content-addressed store, hash-verified

30// A hack until issue golang/go#2632 is fixed.
31// See: https://github.com/golang/go/issues/2632
32func bytesToString(b *[]byte) string {
33 return *(*string)(unsafe.Pointer(b))
34}
35
36func StringToBytes(s string) []byte {
37 b := make([]byte, 0, 0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected