DEV Community

Discussion on: Using named return variables to capture panics in Go

Collapse
 
avjinder profile image
Avjinder

You can even remove the variable name when using named variable returns.
Just return will suffice. Go will automatically return the err variable from within the function block.

Collapse
 
joncalhoun profile image
Jon Calhoun

I know but I prefer the more explicit version

Collapse
 
avjinder profile image
Avjinder

Ok then.