package gentools func IndexOf[T comparable](arr []T, value T) int { for i, v := range arr { if v == value { return i } } return -1 } func AddUniques[T comparable](arr *[]T, values ...T) { Outer: for _, v := range values { for _, v2 := range *arr { if v2 == v { continue Outer } } *arr = append(*arr, v) } }