ci: bump to go 1.23 (#453)

Upgrade to Go 1.23.

Upgrade also requires bumping `golangci-lint` to v1.62.2, and upgrading
third-party test versions for some failing cases.
This commit is contained in:
Michael McLoughlin
2024-12-22 19:01:48 -05:00
committed by GitHub
parent 3b84ecd27b
commit b985ff5775
31 changed files with 88 additions and 100 deletions

View File

@@ -190,7 +190,7 @@ func (c *component) Field(n string) Component {
// }
//
fields := make([]*types.Var, s.NumFields())
for i := 0; i < s.NumFields(); i++ {
for i := range s.NumFields() {
fields[i] = s.Field(i)
}
offsets := Sizes.Offsetsof(fields)

View File

@@ -192,7 +192,7 @@ func TestComponentDeconstruction(t *testing.T) {
// For every test case, generate the same case but when the type is wrapped in
// a named type.
n := len(cases)
for i := 0; i < n; i++ {
for i := range n {
wrapped := cases[i]
wrapped.Name += "_wrapped"
wrapped.Type = types.NewNamed(
@@ -204,7 +204,6 @@ func TestComponentDeconstruction(t *testing.T) {
}
for _, c := range cases {
c := c // avoid scopelint error
t.Run(c.Name, func(t *testing.T) {
t.Log(c.Type)
base := operand.NewParamAddr("test", 0)

View File

@@ -131,7 +131,7 @@ func newTuple(t *types.Tuple, offsets []int64, size int64, defaultprefix string)
byname: map[string]Component{},
size: int(size),
}
for i := 0; i < t.Len(); i++ {
for i := range t.Len() {
v := t.At(i)
name := v.Name()
if name == "" {
@@ -172,7 +172,7 @@ func (t *Tuple) Bytes() int { return t.size }
func tuplevars(t *types.Tuple) []*types.Var {
vs := make([]*types.Var, t.Len())
for i := 0; i < t.Len(); i++ {
for i := range t.Len() {
vs[i] = t.At(i)
}
return vs

View File

@@ -143,7 +143,7 @@ func TypesTuplesEqual(a, b *types.Tuple) bool {
return false
}
n := a.Len()
for i := 0; i < n; i++ {
for i := range n {
if !TypesVarsEqual(a.At(i), b.At(i)) {
return false
}