Large refactor and addedGetAllChanges to each change

tons of updates, so many things.
This commit is contained in:
Dave Shanley
2023-03-20 19:19:29 -04:00
parent 0e8ae7c548
commit 5189eadddc
91 changed files with 3483 additions and 715 deletions

View File

@@ -21,6 +21,16 @@ type ExampleChanges struct {
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
// GetAllChanges returns a slice of all changes made between Example objects
func (e *ExampleChanges) GetAllChanges() []*Change {
var changes []*Change
changes = append(changes, e.Changes...)
if e.ExtensionChanges != nil {
changes = append(changes, e.ExtensionChanges.GetAllChanges()...)
}
return changes
}
// TotalChanges returns the total number of changes made to Example
func (e *ExampleChanges) TotalChanges() int {
l := e.PropertyChanges.TotalChanges()