google / google/gvisor

Remove gohacks.SliceHeader (Go 1.20+)

Open
#8,422 3 comments 0 reactions 2 assignees Claimed by @nixprime View on GitHub
no-auto-close type: cleanup
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

As far as I can tell, all existing uses can be replaced either with `unsafe.Pointer(&slice[0])`, or `unsafe.Slice()` (new in Go 1.20).

Once only 1.20 is supported, gohacks.SliceHeader could be removed completely. The former can be removed immediately.

### Is this feature related to a specific bug?

_No response_

### Do you have a specific solution in mind?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.