The one about named returns, err always being nil, why is err even in scope, seems like it should be a compile error to me? (I rarely write Go).
In the code, an error is found and it does not assign a value to err and just returns it as the error value.
So it returns nil as the error when it wants to return an error with a proper value.
The code should be something like:
if ctx.Err() != nil {
return 0, 0, ctx.Err()
}