Go release 1.19

Introduction to Go 1.19

Most changes are in the implementation of the toolchain, runtime, and libraries. Maintains Go 1 promise of compatibility.

Changes to the language

Very small correction to the scope of type parameters in method declarations. Existing programs are unaffected.

Memory Model

Revised to align Go with the memory model used by other major languages. Introduces new types in the sync/atomic package for easier use of atomic values.

Ports

  • Adds support for Loongson 64-bit architecture (LoongArch) on Linux.
  • RISC-V port now supports passing function arguments and results using registers, improving performance.

Tools

  • Support for links, lists, and clearer headings in doc comments.
  • New unix build constraint for Unix-like systems.
  • Changes to go command and go generate for better environment handling.

Runtime

  • Support for a soft memory limit, managed via runtime/debug.SetMemoryLimit or GOMEMLIMIT environment variable.
  • Improved handling of GC CPU utilization and reduced effects of GC thrashing.
  • Automatic increase of the open file limit on Unix systems.
  • Simplified tracebacks for unrecoverable fatal errors.

Compiler

  • Uses jump table to implement large integer and string switch statements for improved performance.
  • Requires -p=importpath flag to build a linkable object file.
  • No longer accepts -importmap flag; use -importcfg instead.

Assembler

Requires -p=importpath flag to build a linkable object file.

Linker

Emits compressed DWARF sections in standard gABI format on ELF platforms.

Core library

  • New atomic types in sync/atomic package.
  • Changes to os/exec for PATH lookups and handling of current directory.
  • Various minor updates and performance improvements across different packages.