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() }