package one type direction int const ( N direction = iota E S W ) type coords struct { x int y int } type node struct { coords direction direction } func newNode(x, y int, dir direction) node { return node{coords{x, y}, dir} }