internal/unsafe: get rid of GoString

The only users were GOOS=windows code, which can use
golang.org/x/sys/windows.BytePtrToString instead.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-11 11:13:49 +01:00
parent 884e7d27e2
commit 5894127204
4 changed files with 2 additions and 36 deletions
-11
View File
@@ -44,14 +44,3 @@ func SliceOf(s uintptr) []byte {
h.Len = 1 << 30
return res
}
// GoString convert a NUL-terminated C string
// to a Go string.
func GoString(s []byte) string {
for i, v := range s {
if v == 0 {
return string(s[:i])
}
}
return string(s)
}