10 ms·
The third line has a new err inside the if statement's scope. It's equivalent to { // begin new scope here err := w.Close() if err != nil {
by skj 8y ago
The third line has a new err inside the if statement's scope.
It's equivalent to
{ // begin new scope here
err := w.Close()
if err != nil {
foo
} else {
bar
}
}