// Merge two Disease list with the 'or' operator
Merge two Disease list with the 'or' operator
// Merge two Disease list with the ' or ' operator
func orMerge(list1 []*Disease, list2 []*Disease) []*Disease {
	var mergeResult []*Disease
	for _, item1 := range list1 {
		mergeResult = append(mergeResult, item1)
	}
	for _, item2 := range list2 {
		contains := false
		for _, itemR := range mergeResult {
			if itemR.Name == item2.Name {
				contains = true
				break
			}
		}
		if !contains {
			mergeResult = append(mergeResult, item2)
		}
	}
	return mergeResult
}
func orMerge ( list1 [ ] * Disease , list2 [ ] * Disease ) [ ] * Disease { var mergeResult [ ] * Disease for _ , item1 := range list1 { mergeResult = append ( mergeResult , item1 ) } for _ , item2 := range list2 { contains := false for _ , itemR := range mergeResult { if itemR . Name == item2 . Name { contains = true break } } if ! contains { mergeResult = append ( mergeResult , item2 ) } } return mergeResult }
Merge two Disease list with the 'or' operator
Merge two Disease list with the ' or ' operator
// Put all item of list1 in mergeResult // Put all item if list2 in mergeResult // Check that the item is not allready in mergeResult // Add the item to mergeResult if mergeResult does not contains it