Graph routines implemented in Go