Skip to content

Instantly share code, notes, and snippets.

@dbarranco
Created February 20, 2017 19:24
Show Gist options
  • Save dbarranco/f2b5671525592e7b17798370750af560 to your computer and use it in GitHub Desktop.
Save dbarranco/f2b5671525592e7b17798370750af560 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
/*
I'm triyng to get this:
g (graph)
Node A:
Node B - CostB
Node C - CostC
...
**/
//Graph object
type graph struct {
Nodes []node
}
//Node object
type node struct {
label string
path []map[string]int
}
func main() {
fmt.Println("### Creating scenario ###")
g := &graph{
Nodes.nodeA: node{
label: "A",
path["B"]: {66},
},
Nodes.nodeB: node{
label: "B",
path[Nodes.nodeB]: {77},
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment