The library functions for unsafely convert between a string and
a slice of bytes. You probably shouldn’t use it unless you need to
squeeze extra performance from your performance-critical code path.
Package unsafeConvert provides functions for unsafely convert between
a string and a slice of bytes. You probably shouldn’t use it unless you need
to squeeze extra performance from your performance-critical code path.
Bytes converts a string into a slice of bytes without performing a copy.
NOTE: This is an unsafe operation and may lead to problems if the bytes are
changed.
String converts a slice of bytes into a string without performing a copy.
NOTE: This is an unsafe operation and may lead to problems if the bytes
passed as argument are changed while the string is used. No checking whether
bytes are valid UTF-8 data is performed.