Skip to content

Instantly share code, notes, and snippets.

@olliebun
Created January 11, 2013 02:52
Show Gist options
  • Save olliebun/4507604 to your computer and use it in GitHub Desktop.
Save olliebun/4507604 to your computer and use it in GitHub Desktop.
variable naming and keyword overlap in go
func find_paths_in_ranges(match_ranges []*matchRange) []Path {
var (
paths = make([]Path, len(ranges))
path Path
i, j int
row *csvm.Row
match_range *matchRange
)
for i, match_range = range ranges {
path = make(Path, match_range.start - match_range.end)
for j = match_range.start; j < match_range.end; j++ {
path[j] = match_range[j + match_range.start].Copy()
}
paths[i] = path
}
return paths
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment