Go: returning from defer
In a deferred function you can alter the returned parameters, but you can’t return a new set. So a simple change to what you have will make it work. There is another problem with what you wrote, namely that the you’ve paniced with a string but are expecting an error in your type assertion. Here … Read more