Five months after the release of Go1.18, Go1.19 was released on schedule. However, most of its changes are in the toolchain, runtime and library implementation. As always, this release maintains the Go 1 compatibility promise. So almost all Go programs continue to compile and run as before.
Important changes in Go 1.19 are:
-
Go memory model, please refer to the official documentation for details: https://go.dev/ref/mem. With the update of the memory model, Go 1.19 introduced new types in the sync/atomic package: types Bool, Int32, Int64, Uint32, Uint64, Uintptr and Pointer, etc., which make the use of atomic values more convenient. -
In terms of tools, the document format is enhanced. Added support for links, lists, and clearer headings in documentation comments. For details, see: https://go.dev/doc/comment. -
In terms of runtime, the most noteworthy change is the addition of runtime/debug.SetMemoryLimit, which can limit the memory usage of Go.
Others are small changes to some libraries.
Detailed changes can be found in the official Release Notes: https://go.dev/doc/go1.19.
Go language Chinese website has also prepared the download package of Go1.19 for everyone: https://studygolang.com/dl.
Recommended reading