photoprism/pkg/list/join.go
Michael Mayer 09f8a58404 Library: Stack sidecar files with vendor specific naming schemes #2983
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-21 15:02:16 +02:00

18 lines
309 B
Go

package list
// Join combines two lists without adding duplicates.
func Join(list []string, join []string) []string {
if len(join) == 0 {
return list
} else if len(list) == 0 {
return join
}
for j := range join {
if Excludes(list, join[j]) {
list = append(list, join[j])
}
}
return list
}