Handle Go Errors by Using a Postfix Completion
Keep writing code as you would and use the postfix completion to generate the boilerplate.
Press . (dot) after the function/method call and continue to type the varCheckError, or simply vce, postfix completion.
It will surround your code with the appropriate boilerplate to create any missing variables that are returned and handle the error checking part for you.