Added breaking change count to core design

Everything will now calculate total changes and breaking changes as a convenience and aggregation mechanism.

Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
Dave Shanley
2022-10-05 10:15:55 -04:00
parent 0dbbc8e826
commit 0b2c3c1201
17 changed files with 176 additions and 110 deletions

View File

@@ -23,6 +23,11 @@ func (e *ExternalDocChanges) TotalChanges() int {
return c
}
// TotalBreakingChanges always returns 0 for ExternalDoc objects, they are non-binding.
func (e *ExternalDocChanges) TotalBreakingChanges() int {
return 0
}
// CompareExternalDocs will compare a left (original) and a right (new) slice of ValueReference
// nodes for any changes between them. If there are changes, then a pointer to ExternalDocChanges
// is returned, otherwise if nothing changed - then nil is returned.