You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a, err := something()
if err != null ...
b, err := somethingElse()
if err != null ...
Go allows this behavior:
Unlike regular variable declarations, a short variable declaration may redeclare variables provided they were originally declared earlier in the same block (or the parameter lists if the block is the function body) with the same type, and at least one of the non-blank variables is new. As a consequence, redeclaration can only appear in a multi-variable short declaration. Redeclaration does not introduce a new variable; it just assigns a new value to the original.
The text was updated successfully, but these errors were encountered:
Example:
Go allows this behavior:
The text was updated successfully, but these errors were encountered: