1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-07-18 04:20:27 +00:00

go*: go get -u ./...

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-03-22 10:57:01 -04:00
parent ce5bddf35e
commit fa29fcb58d
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
229 changed files with 28484 additions and 2819 deletions

View file

@ -29,8 +29,6 @@ import (
"bytes"
"strings"
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@ -82,13 +80,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.