3 ms·
That solves nothing. The point was that you pollute the scope with error variables, leading to dangerous logic errors that can be hard to spot. Your snippet is
by lobster_johnson 9y ago
That solves nothing. The point was that you pollute the scope with error variables, leading to dangerous logic errors that can be hard to spot. Your snippet is no better than:
foo, err := getFoo()
if err != nil {
return nil, err
}
"err" still ends up in the scope.