Created
March 15, 2018 21:55
-
-
Save sitano/967664217a0fb531a9dd59d65997c603 to your computer and use it in GitHub Desktop.
env GOSSAFUNC=keys go build for_keys_go_issue2.go
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 | |
import "fmt" | |
type S struct { | |
b [8]byte | |
} | |
func keys(m map[S]struct{}) [][]byte { | |
var z [][]byte | |
for k := range m { | |
z = append(z, k.b[:]) | |
} | |
return z | |
} | |
func main() { | |
fmt.Println(keys(map[S]struct{}{ | |
S{b: [8]byte{1}}: struct{}{}, | |
S{b: [8]byte{2}}: struct{}{}, | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment