1 个仓库
Modifying struct elements in a range loop by accessing them through their index, because the value variable is a copy.
Distinct from Range-Based Loop Iteration: Distinct from Range-Based Loop Iteration: focuses on mutation of structs via index, not general iteration.
Explore 1 awesome GitHub repository matching software engineering & architecture · Struct Mutations by Index. 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 correct struct mutation inside Go range loops.