Unintended variable shadowing (#1)
Official 100go entry highlighting how shadowed identifiers quietly change control flow and error handling.
Official 100go entry highlighting how shadowed identifiers quietly change control flow and error handling.
- Author: Teiva Harsanyi
- Authority: community
- Kind: guide
- URL: https://100go.co/#unintended-variable-shadowing-1
What it covers
- short declaration shadowing
- scope confusion
- review heuristics for shadowing
Why authoritative
Official 100go website entry for this specific mistake.
Use when
- is this variable shadowed in Go
- could := create a shadowing bug here
- how should I avoid unintended shadowing in Go
Keywords
- shadowing, variable shadowing, short declaration, scope, bugs