Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go to v1.22.2 (8.13 backport) #2156

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

kubasobon
Copy link
Member

Summary of your changes

Updates go to latest stable release. Also related to https://github.com/elastic/security/issues/2042, since it patches a zero-day vulnerability.

Release notes: https://tip.golang.org/doc/go1.22

Points of interest:

Go 1.22 makes two changes to “for” loops.

  • Previously, the variables declared by a “for” loop were created once and updated by each iteration. In Go 1.22, each iteration of the loop creates new variables, to avoid accidental sharing bugs. The transition support tooling described in the proposal continues to work in the same way it did in Go 1.21.
  • “For” loops may now range over integers. For example:
package main
import "fmt"

func main() {
  for i := range 10 {
    fmt.Println(10 - i)
  }
  fmt.Println("go1.22 has lift-off!")
}

Go 1.22 includes a preview of a language change we are considering for a future version of Go: range-over-function iterators. Building with GOEXPERIMENT=rangefunc enables this feature.

@kubasobon kubasobon added dependency go Pull requests that update Go code backport-v8.13.0 labels Apr 24, 2024
@kubasobon kubasobon self-assigned this Apr 24, 2024
@kubasobon kubasobon requested a review from a team as a code owner April 24, 2024 10:41
@kubasobon kubasobon changed the title Bump go 1 22 backport Update go to v1.22.2 (8.13 backport) Apr 24, 2024
Copy link
Member

@romulets romulets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to solve the CNVM problem before merging

@kubasobon kubasobon merged commit 02082ee into elastic:8.13 Apr 24, 2024
27 of 28 checks passed
@kubasobon kubasobon deleted the bump-go-1-22-backport branch April 24, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.13.0 dependency go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants