Created
April 12, 2016 14:42
-
-
Save mzimmerman/ad986f306eb71e95e9730436756caf33 to your computer and use it in GitHub Desktop.
Show failure of go tool compiling large map literal
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
#!/bin/sh | |
for fname in $(seq 1 $1); do | |
echo "\"$fname\" : {" | |
echo "name : \"$fname\"," | |
echo "Weight : 50," | |
echo "Emails : []string {" | |
echo "}," | |
echo "}," | |
done |
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 "log" | |
func main() { | |
log.Printf("groups = %d",len(groups)) | |
} | |
type Group struct { | |
name string | |
Weight int | |
Emails []string | |
} | |
var groups = map[string]Group{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment