Last active
June 28, 2019 04:17
-
-
Save siburu/8526babc4ac89da7fc082660b325401f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type S struct { | |
i int | |
} | |
func main() { | |
var a []*int | |
for _, s := range []S{{1},{2},{3}} { | |
a = append(a, &s.i) | |
} | |
for _, p := range a { | |
println(*p) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment