by vldo · 7y ago · 0 comments
For me this is the appeal of the language; I really prefer things confined and manually scoped rather than having things globally scoped which would cause a lot of debate just around that. You often have to think about what you want to expose and where, but that's a good thing in my opinion.
for _, f := range fs {
func() {
defer f.Close()
}()
}