THE STATE OF GO What's new since Go 1.10
bit.ly/sog-fosdem19 Maartje Eyskens @maartjeme Francesc Campoy @francesc
What's new since Go 1.10 ▪ Go 1.11 ▫ Released
August 24th 2018 ▪ Go 1.12 ▫ Released … eventually ▫ Go 1.12 beta2 released on January 10th 2019
Agenda Changes to: • the language • the standard library
• the tooling • the community
CHANGES TO THE LANGUAGE
This page is intentionally left void
CHANGES TO THE STANDARD LIBRARY
Breaking Changes
Changed behavior when typed interface to an implicit escaper function.
Previously <nil>. Now ignored. html/template 11 Go 1.11
Before: <nil> Now: nothing* * or not 12
Reader's UnreadRune and UnreadByte methods will now return an error
if they are called after Peek. bufio 13 Go 1.12
Before: nothing Now: bufio: invalid use of UnreadByte
Other Interesting Changes
templating: assignment Previously, only variable declaration was possible. Now, assignment
is also supported! Go 1.11
x.Replace(s, a, b, -1) → x.ReplaceAll(s, a, b) where x
can be: ▪ bytes ▪ strings new ReplaceAll functions Go 1.12
builtin: maps printed sorted Previously, in order to print a
map sorted by keys: 1. Iterate over all the keys 2. Sort them (somehow) 3. Iterate over the sorted keys 4. Print key and value Go 1.12
printing a map in order before
Now, in order to print a map sorted by keys:
1. Print the map WARNING: iteration order is still random. builtin: maps are now printed sorted
TLS 1.3 support ▪ Cipher suites are not configurable (yet?)
▪ 0-RTT not supported ▪ Only if set: Go 1.12
why TLS 1.3? Without 0-RTT ▪ 1 fewer round trip
▪ Only secure cipher suites* ▪ Support in all major browsers * in January 2019 Go 1.12
why TLS 1.3? TLS1.2 Without 0-RTT Source: Wikipedia
why TLS 1.3? Without 0-RTT Source: Wikipedia Go 1.12
TOOLING
go run pkg now works! Go 1.11
go run dir now works! Go 1.11
debugger can now run functions Go 1.11
▪ Delve v1.1.0 only ▪ No new variables ▪ All
goroutines will continue ▪ Only when stopped at a safe point ▪ Only on Linux (MacOS too) debugger can now run functions Go 1.11
godoc ▪ godoc CLI is deprecated ▪ Use go doc
▪ In1.12 feature complete with -all flag 31
godoc 32 ▪ godoc now show version that introduced stuff
“For the addition of features in later point releases, it
may be necessary to add fields to exported structs in the API. Go 1 and the Future of Go Programs 33
▪ go tool vet is deprecated ▪ Detects wrapped fmt.Printf
errors go vet 34 Go 1.11 Go 1.12
modules ▪ an alternative to GOPATH ▪ integrated versioning and
package distribution ▪ details are likely to change ▪ Binary only packages not supported after 1.12 ▪ No more @ in import path ▪ golang.org/x/tools/go/packages Go 1.11
modules Go 1.11 justforfunc.com
Add custom events to runtime traces. Documentation: golang.org/pkg/runtime/trace More: bit.ly/go-udtrace
runtime/trace: user annotations Go 1.11
RUNTIME
Couldn’t find anything for 1.12 PERFORMANCE
PORTS ▪ Go 1.11 OpenBSD 6.2 or later ▪ OpenBSD
6.4 only works on Go 1.11 and later ▪ Go 1.13 on macOS will require 10.11 or later ▪ Go 1.12 last release supported on FreeBSD 10.x ▪ Runtime: arm64 now faster ▪ windows/arm supports Raspberry Pi3 ▪ RISC-V and GNU/HURD are reserved values
▪ Go can now compile to Web Assembly (wasm) More:
github.com/golang/go/wiki/WebAssembly web assembly Go 1.11
COMMUNITY
Back in 2014 (five years ago!)
Last year ...
This year ...
WOMEN WHO GO & GOBRIDGE MEETUPS 46 6 more than
2018: 30 chapters now!
GO MEETUPS IN THE WORLD
conferences ▪ Go Devroom @ FOSDEM 2019 (you are here)
▪ dotGo: Paris, March 25 ▪ GothamGo: NYC, April 12 ▪ GopherCon Singapore, April 24-26 ▪ GopherCon EU: Tenerife, May 30-June 1 ▪ GoCon Canada: Toronto, May 31 ▪ GopherCon: San Diego, July 24-27
THANKS! Francesc and (voiceless) Maartje 54 Gophers by Renee French,
Ashley McNamara, Egon Elbre, Sam Croswell and Miguel Molina