http://godoc.org/bitbucket.org/creachadair/perm
The perm package implements functions to manipulate permutations.
perm