Skip to content
TILens What matters today in tech v0.2.0
Theme

Topic - Edition

Go

1 items on 08 Dec 2019
Go

Dynamically scoped variables in Go

This is a thought experiment in API design. It starts with the classic Go unit testing idiom: func TestOpenFile(t *testing.T) { f, err := os.Open("notfound") if err != nil { t.Fatal(err) } // ... } What’s the problem…

Source: Dave Cheney Dave Cheney