| 91 | } |
| 92 | |
| 93 | func diffParam(path string, paramA ComponentDefinitionParam, paramB ComponentDefinitionParam) ([]ComponentDiffAttributeChange, error) { |
| 94 | changes := make([]ComponentDiffAttributeChange, 0) |
| 95 | |
| 96 | pathA := path + "/param[@name='" + paramA.ParamName + "']" |
| 97 | if (paramA.ParamDescription != paramB.ParamDescription) { |
| 98 | var change ComponentDiffAttributeChange |
| 99 | change.Path = pathA + "/description" |
| 100 | change.OldValue = paramA.ParamDescription |
| 101 | change.NewValue = paramB.ParamDescription |
| 102 | changes = append(changes, change) |
| 103 | } |
| 104 | |
| 105 | if (paramA.ParamPass != paramB.ParamPass) { |
| 106 | var change ComponentDiffAttributeChange |
| 107 | change.Path = pathA + "/pass" |
| 108 | change.OldValue = paramA.ParamPass |
| 109 | change.NewValue = paramB.ParamPass |
| 110 | changes = append(changes, change) |
| 111 | } |
| 112 | |
| 113 | if (paramA.ParamType != paramB.ParamType) { |
| 114 | var change ComponentDiffAttributeChange |
| 115 | change.Path = pathA + "/type" |
| 116 | change.OldValue = paramA.ParamType |
| 117 | change.NewValue = paramB.ParamType |
| 118 | changes = append(changes, change) |
| 119 | } |
| 120 | |
| 121 | if (paramA.ParamClass != paramB.ParamClass) { |
| 122 | var change ComponentDiffAttributeChange |
| 123 | change.Path = pathA + "/class" |
| 124 | change.OldValue = paramA.ParamClass |
| 125 | change.NewValue = paramB.ParamClass |
| 126 | changes = append(changes, change) |
| 127 | } |
| 128 | |
| 129 | return changes, nil |
| 130 | } |
| 131 | |
| 132 | func diffMethod(path string, methodA ComponentDefinitionMethod, methodB ComponentDefinitionMethod) ([]ComponentDiffElementAdd, []ComponentDiffElementRemove, []ComponentDiffAttributeChange, error) { |
| 133 | changes := make([]ComponentDiffAttributeChange, 0) |