This Saturday, the Golang team released the State of Go February 2019 outlining the developments in the programming language and showing its current state. Since Golang 1.11, changes have been made to the standard library, tooling, and the community.
Changes in the standard library
The behavior when an interface is typed to an implicit escaper function is changed. It was previously
Changes under bufio, NewReader
The UnreadRune and UnreadByte methods from Reader will return an error if they are called after Peek.
new ReplaceAll function
There is a new ReplaceAll function where the value passed can be bytes or strings.
Changes under builtin: maps printed sorted
To print a map sorted by keys, developers can just print the map. However, note that iteration will be done randomly.
Using TLS 1.3 in Go helps by causing one fewer round trip, securing only cipher suites, and provides support in all major browsers.
The following commands now work:
- go run pkg
- go run dir
- Functions can now be run in the debugger.
- The godoc CLI is now deprecated.
- The go vet tool is deprecated in Go 1.12. It detects wrapped fmt.Printf errors.
modules is an alternative to GOPATH. It has integrated versioning and package distribution.
Now there are custom events to runtime traces.
Go can now compile to WebAssembly (wasm files)
- You need Go 1.11 and later for OpenBSD 6.4
- arm64 runtime is now faster
- Windows/arm now has support for Raspberry Pi3
These were a select few important updates from the presentation, for more details you can view The State of Go: Feb 2019.