...
This commit is contained in:
parent
a8480a4ca6
commit
7ea4270c88
@ -21,6 +21,5 @@ func UnsafeStringToBytes(s string) (b []byte) {
|
|||||||
// If you modify b, then s will also be modified. This violates the
|
// If you modify b, then s will also be modified. This violates the
|
||||||
// property that strings are immutable.
|
// property that strings are immutable.
|
||||||
func UnsafeBytesToString(b []byte) (s string) {
|
func UnsafeBytesToString(b []byte) (s string) {
|
||||||
unsafe.String(unsafe.SliceData(b), len(b))
|
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||||
return s
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user