Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created March 19, 2015 01:03
Show Gist options
  • Save lettergram/a8f2b473dab0438f3862 to your computer and use it in GitHub Desktop.
Save lettergram/a8f2b473dab0438f3862 to your computer and use it in GitHub Desktop.
type dataone struct {
Value int
}
type datatwo struct {
Value int
Name string
}
func example() {
g := Graph{}
g.Node = make(map[string]Node)
AddNode(&g, Node{"node1", dataone{1}, nil}, "node1")
AddNode(&g, Node{"node2", datatwo{1, "bob"}, nil}, "node2")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment