Update graph.go

Made graph.go abstract