1 of 51

What's coming in Go 1.15

Go Remote Fest, 2020 - Daniel Martí

2 of 51

Caveat: my personal picks.

3 of 51

We are three months away.

4 of 51

Most of these are merged.

5 of 51

This release is a bit smaller

6 of 51

Section 1: The top 5

7 of 51

8 of 51

(the linker is not yet finished)

9 of 51

#2: slightly smaller binaries

10 of 51

package main

import (

"io"

"net/http"

"os"

)

func main() {

resp, _ := http.Get("https://golang.org/dl/")

io.Copy(os.Stdout, resp.Body)

}

11 of 51

$ go version

go version go1.14.2 linux/amd64

$ gotip version

go version devel +49f10f3797 Sat Apr 25 02:19:12 2020 +0000 linux/amd64

$ go build -ldflags='-w -s' -o 114

$ gotip build -ldflags='-w -s' -o 115

$ du -b 114 115

5111808 114

5009408 115

12 of 51

2% isn't much, but it's progress!

13 of 51

#3: embed tzdata with time/tzdata

https://golang.org/issue/38017

14 of 51

#4: add testing.TB.TempDir

https://golang.org/issue/35998

15 of 51

#5: add testing.T.Deadline

https://golang.org/issue/28135

16 of 51

Section 2: Ports

17 of 51

linux/arm64 is now a first class port

https://golang.org/issue/35593

18 of 51

riscv64 getting better

(too many CLs!)

19 of 51

darwin/386 removed

https://golang.org/issue/37610

20 of 51

darwin/arm removed

https://golang.org/issue/37611

21 of 51

Section 3: API changes

22 of 51

net/url.URL RawFragment and EscapedFragment

https://golang.org/issue/37776

23 of 51

net/url.URL.Redacted

https://golang.org/issue/34855

24 of 51

time.Ticker.Reset

https://golang.org/issue/33184

25 of 51

regexp.Regexp.SubexpIndex

https://golang.org/issue/32420

26 of 51

sync.Map.LoadAndDelete

https://golang.org/issue/33762

27 of 51

os.ErrDeadlineExceeded

https://golang.org/issue/31449

28 of 51

crypto/tls.Dialer.DialContext

https://golang.org/issue/18482

29 of 51

crypto/ecdsa SignASN1 and VerifyASN1

https://golang.org/issue/20544

30 of 51

Section 4: Tooling

31 of 51

go env GOMODCACHE

https://golang.org/issue/34527

32 of 51

opt-in fallbacks in GOPROXY

https://golang.org/issue/37367

33 of 51

vet: warn about string(int)

https://golang.org/issue/32479

34 of 51

vet: detect impossible interface assertions

https://golang.org/issue/4483

35 of 51

compiler adds a -spectre flag

https://golang.org/cl/222660

36 of 51

remove old export format support

https://golang.org/issue/27999

37 of 51

-timeout flag affects the test cache

https://golang.org/issue/36134

38 of 51

skip //go: lines in godoc comments

https://golang.org/issue/37974

39 of 51

allow println(twoValues())

https://golang.org/issue/35576

40 of 51

panic: show printable values behind addresses

https://golang.org/issue/37531

41 of 51

Section 5: Performance

42 of 51

better write barriers on amd64

https://golang.org/cl/226367

43 of 51

mid-stack inlining of funcs in a recursion chain

https://golang.org/issue/29737

44 of 51

use dup3 in forkAndExec on Linux

https://golang.org/cl/220422

45 of 51

15% speed up in sha512

https://golang.org/cl/211617

46 of 51

ReadMemStats latency down 95%

https://golang.org/issue/19812

47 of 51

speed up receive on closed channel by 99%

https://golang.org/issue/32529

48 of 51

don't alloc when converting small ints to interfaces

https://golang.org/cl/216401

49 of 51

intrinsic for CPU features

https://golang.org/issue/36351

50 of 51

Parting thoughts:

Skimming over master is very useful.

51 of 51

go get golang.org/dl/gotip