Skip to content

Instantly share code, notes, and snippets.

@mzimmerman
Created April 12, 2016 14:42
Show Gist options
  • Save mzimmerman/ad986f306eb71e95e9730436756caf33 to your computer and use it in GitHub Desktop.
Save mzimmerman/ad986f306eb71e95e9730436756caf33 to your computer and use it in GitHub Desktop.
Show failure of go tool compiling large map literal
#!/bin/sh
for fname in $(seq 1 $1); do
echo "\"$fname\" : {"
echo "name : \"$fname\","
echo "Weight : 50,"
echo "Emails : []string {"
echo "},"
echo "},"
done
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