Skip to content

Instantly share code, notes, and snippets.

@motyar
Created June 2, 2017 12:54
Show Gist options
  • Save motyar/849a5c8f46617cdc5d0f6122534ecb85 to your computer and use it in GitHub Desktop.
Save motyar/849a5c8f46617cdc5d0f6122534ecb85 to your computer and use it in GitHub Desktop.
An array, slice, or map composite literal of the form:
[]T{T{}, T{}}
will be simplified to:
[]T{{}, {}}
A slice expression of the form:
s[a:len(s)]
will be simplified to:
s[a:]
A range of the form:
for x, _ = range v {...}
will be simplified to:
for x = range v {...}
A range of the form:
for _ = range v {...}
will be simplified to:
for range v {...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment