the code examples won't run except locally and using Go 1.10. The playground still runs Go 1.9. do not send issues about the slides not running correctly online!
NetBSD: works but requires NetBSD 8 ... which is not released yet OpenBSD: next version will require OpenBSD 6.2 OS X: next version will require OS X 10.10 Yosemite Windows: next version will require Windows 7 (no more XP or Vista) 32-bits MIPS have now a new GOMIPS variable (hard oat | softfloat)
of compiled packages. go install and go build are much faster in general as a result you won't need go build -i anymore! It seems the pkg directory might eventually disappear!
strings ok strings (cached) In order to bypass the cachee use -count=1 ➜ go test -count=1 strings ok strings 0.295s Also runs vet, some of your tests might fail. Also: coverprofile can be done over many tests too new -failfast and -json ags
happy about it! Before -s int some other stuff it's long to explain -z int some number (default 42) Now -s int some other stuff it's long to explain -z int some number (default 42) stuff := flag.Int("s", 0, "some other stuff\nit's long to explain") z := flag.Int("z", 42, "some number") flag.Parse() Run
of T, *T, or **T are now linked to T. Those functions now appear in the Funcs list of the type, not the package. Example: package things // Thing is stuff. type Thing struct{} // NewThing returns a new thing. func NewThing() *Thing { return nil } // ManyThings returns many new things. func ManyThings() []Thing { return nil }
Interestingly, this is not implemented in the html package. var tmpl = template.Must(template.New("example").Funcs(template.FuncMap{ "even": func(x int) bool { return x%2 == 0 }, }).Parse(` {{ range . }} {{ . }} {{ if even . -}} even {{ continue }} {{ end -}} odd {{ if eq . 5 }} {{ break }} {{ end }} {{ end }} `)) Run
But there's some issues with it. String creates allocations since it convers []byte to string. There could be a better and simpler way to do this. This uses unsafe to avoid copies in the creation of strings. var buf bytes.Buffer fmt.Fprintln(&buf, "Hello, FOSDEM gophers!") fmt.Printf(buf.String()) Run var b strings.Builder fmt.Fprintln(&b, "Hello, FOSDEM gophers!") fmt.Printf(b.String()) Run
March in Pune, India GopherCon Russia - March in Moscow, Russia GoSF - March in San Francisco, USA GothamGo - April in New York, USA GopherCon SG - May in Singapore GopherCon Europe - June in Reykjavik, Iceland GopherCon Denver - August in Denver, USA GopherCon Brasil - September in Florianópolis, Brazil GoLab - October in Florence, Italy dotGo - March 2019 in Paris, France