MCPcopy
hub / github.com/tinylib/msgp / UnsafeString

Function UnsafeString

msgp/unsafe.go:25–27  ·  view source on GitHub ↗

UnsafeString returns the byte slice as a volatile string THIS SHOULD ONLY BE USED BY THE CODE GENERATOR. THIS IS EVIL CODE. YOU HAVE BEEN WARNED.

(b []byte)

Source from the content-addressed store, hash-verified

23// THIS IS EVIL CODE.
24// YOU HAVE BEEN WARNED.
25func UnsafeString(b []byte) string {
26 return *(*string)(unsafe.Pointer(&b))
27}
28
29// UnsafeBytes returns the string as a byte slice
30//

Callers 4

HasKeyFunction · 0.70
locateFunction · 0.70
locateKVFunction · 0.70
ReadStringMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…