09f8a58404
Signed-off-by: Michael Mayer <michael@photoprism.app>
18 lines
309 B
Go
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
|
|
}
|