Go implementation for graffinity