Go version
go1.23.1
Output of go env in your module/workspace:
What did you do?
Run gofmt -s
What did you see happen?
Nothing.
What did you expect to see?
Rewrite of *(*logid.PublicID)(buf) to logid.PublicID(buf). Where logid.PublicID is an [...]byte type and buf is an []byte.
Go 1.17 introduced conversion of slices to array pointers, which resulted in code of the *(*A)(s) pattern. Go 1.20 introduced direct conversion of a slice to an array, thus making the *(*A)(s) pattern redundant.
Go version
go1.23.1
Output of
go envin your module/workspace:What did you do?
Run
gofmt -sWhat did you see happen?
Nothing.
What did you expect to see?
Rewrite of
*(*logid.PublicID)(buf)tologid.PublicID(buf). Wherelogid.PublicIDis an[...]bytetype andbufis an[]byte.Go 1.17 introduced conversion of slices to array pointers, which resulted in code of the
*(*A)(s)pattern. Go 1.20 introduced direct conversion of a slice to an array, thus making the*(*A)(s)pattern redundant.