Package unique provides primitives for sorting slices removing repeated elements.
Executing this code:
s := []int{3, 5, 1, 7, 2, 3, 7, 5, 2}
less := func(i, j int) bool { return s[i] < s[j] }
unique.Slice(&s, less)
fmt.Println(s)
Will output the following:
[1 2 3 5 7]