Pinned Loading
-
Go - bytes and string trick
Go - bytes and string trick 1func BytesToString(bs []byte) string {
2return *(*string)(unsafe.Pointer(&bs))
3}
45// NOTE: go version >= 1.20
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.