1 repositorio
Modifying the original element in a range loop by accessing it through its index, because the loop variable is a copy.
Distinct from Range-Based Loop Iteration: Distinct from Range-Based Loop Iteration: focuses on mutation via index, not general iteration syntax.
Explore 1 awesome GitHub repository matching software engineering & architecture · Index-Based Mutations. Refine with filters or upvote what's useful.
100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply
Teaches how to correctly mutate slice elements inside range loops.