Paul Krill writes that the latest update to Google'''s Go programming language introduces three major enhancements, including support for generic methods where method declarations can declare their own type parameters. Other significant changes include allowing any valid field selector as a key in struct literals and implementing function type inference across all assignment contexts.
- Size-specialized memory allocation reduces small object costs by up to 30%.
- The goroutineleak profile is now generally available for detecting blocked goroutines.
- `go mod tidy` now consolidates multiple `require` blocks in the `go.mod` file into a standard two-block structure.
- New modernizers have been added to the `go fix` tool, including `atomictypes` and `embedlit`.