Continued pattern building, added info changes

tried to make some more generic patterns, but I think it's about as thin as it can be now, some boilerplate will be required.

Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
Dave Shanley
2022-10-03 09:46:12 -04:00
parent 9775c384f7
commit 65fa21be86
6 changed files with 517 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ import (
// CreateChange is a generic function that will create a Change of type T, populate all properties if set, and then
// add a pointer to Change[T] in the slice of Change pointers provided
func CreateChange[T any](changes *[]*Change[T], changeType int, property string, leftValueNode, rightValueNode *yaml.Node,
breaking bool, originalObject, newObject T) *[]*Change[T] {
breaking bool, originalObject, newObject any) *[]*Change[T] {
// create a new context for the left and right nodes.
ctx := CreateContext(leftValueNode, rightValueNode)