TUN-6937: Bump golang.org/x/* packages to new release tags

This commit is contained in:
Devin Carr
2022-11-11 15:48:45 -08:00
parent 85b44695f0
commit 1fe4878264
244 changed files with 24750 additions and 3579 deletions

View File

@@ -30,8 +30,6 @@ import (
"strings"
"syscall"
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -83,13 +81,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
var s []byte
h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
h.Data = unsafe.Pointer(p)
h.Len = n
h.Cap = n
return string(s)
return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.