| 398 | |
| 399 | |
| 400 | func diffError(path string, errorA ComponentDefinitionError, errorB ComponentDefinitionError) ([]ComponentDiffAttributeChange, error) { |
| 401 | changes := make([]ComponentDiffAttributeChange, 0) |
| 402 | |
| 403 | pathA := path + "/error[@name='" + errorA.Name + "']" |
| 404 | if (errorA.Code != errorB.Code) { |
| 405 | var change ComponentDiffAttributeChange |
| 406 | change.Path = pathA + "/code" |
| 407 | change.OldValue = string(errorA.Code) |
| 408 | change.NewValue = string(errorB.Code) |
| 409 | changes = append(changes, change) |
| 410 | } |
| 411 | |
| 412 | if (errorA.Description != errorB.Description) { |
| 413 | var change ComponentDiffAttributeChange |
| 414 | change.Path = pathA + "/description" |
| 415 | change.OldValue = errorA.Description |
| 416 | change.NewValue = errorB.Description |
| 417 | changes = append(changes, change) |
| 418 | } |
| 419 | |
| 420 | return changes, nil |
| 421 | } |
| 422 | |
| 423 | func diffErrors(path string, errorsA[] ComponentDefinitionError, errorsB[] ComponentDefinitionError) ([]ComponentDiffElementAdd, []ComponentDiffElementRemove, []ComponentDiffAttributeChange, error) { |
| 424 | changes := make([]ComponentDiffAttributeChange, 0) |