Created
March 15, 2018 21:47
-
-
Save sitano/55f58c1432b2a06cf059598956ef077d 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 | |
import "fmt" | |
type S struct { | |
b [8]byte | |
} | |
func main() { | |
mmap := map[S]struct{}{ | |
S{b: [8]byte{1}}: struct{}{}, | |
S{b: [8]byte{2}}: struct{}{}, | |
} | |
var z [][]byte | |
for k := range mmap { | |
z = append(z, k.b[:]) | |
} | |
fmt.Println(z) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment