提交
This commit is contained in:
9
pkg/util/memory.go
Normal file
9
pkg/util/memory.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package util
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func DeepCoyp(s string) string {
|
||||
b := make([]byte, len(s))
|
||||
copy(b, s)
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
}
|
||||
Reference in New Issue
Block a user