mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Large refactor and addedGetAllChanges to each change
tons of updates, so many things.
This commit is contained in:
@@ -14,6 +14,16 @@ type XMLChanges struct {
|
||||
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
|
||||
}
|
||||
|
||||
// GetAllChanges returns a slice of all changes made between XML objects
|
||||
func (x *XMLChanges) GetAllChanges() []*Change {
|
||||
var changes []*Change
|
||||
changes = append(changes, x.Changes...)
|
||||
if x.ExtensionChanges != nil {
|
||||
changes = append(changes, x.ExtensionChanges.GetAllChanges()...)
|
||||
}
|
||||
return changes
|
||||
}
|
||||
|
||||
// TotalChanges returns a count of everything that was changed within an XML object.
|
||||
func (x *XMLChanges) TotalChanges() int {
|
||||
c := x.PropertyChanges.TotalChanges()
|
||||
|
||||
Reference in New Issue
Block a user