func solveLocationMergeConflict(conflicts map[string]MergeConflict) (map[string]MergeSolution, error) {
	solution := make(map[string]MergeSolution, len(conflicts))
	for key, value := range conflicts {
		var leftTitle string
		switch left := value.Left.(type) {
		case *model.Location:
			leftTitle = left.Title.String
		default:
			panic(fmt.Sprintf("No other type than *model.Location is supported! Given: %T", left))
		}
		if leftTitle != "" {
			solution[key] = MergeSolution{Side: LeftSide, Solution: value.Left, Discarded: value.Right}
		} else {
			solution[key] = MergeSolution{Side: RightSide, Solution: value.Right, Discarded: value.Left}
		}
	}
	return solution, nil
}
solveLocationMergeConflict solves a merge conflict by trying to choose the Location that has
a Title. If both don't have one, choose the right.
package merger
import (
	"fmt"
	"github.com/AndreasSko/go-jwlm/model"
)
func MergeLocations(left []*model.Location, right []*model.Location) ([]*model.Location, IDChanges, error) {
	result, changes, err := tryMergeWithConflictSolver(left, right, nil, solveLocationMergeConflict)
	return model.Location{}.MakeSlice(result), changes, err
}