2 Commits

Author SHA1 Message Date
Ian Johnson
3c9708c927 strutil/intersection.go: apply optimization from Miguel
Thanks to Miguel for the suggestion

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-03 11:50:36 -05:00
Ian Johnson
46647a836f strutil: add Intersection()
This treats input slices as sets and computes the intersection of those sets.

We need this for cloud-init where we have to take a 3-way intersection of slice
lists.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-03 10:37:26 -05:00