MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / appendSequenceDiffs

Function appendSequenceDiffs

internal/node/node.go:358–369  ·  view source on GitHub ↗
(diffs []string, node1, node2 *yaml.Node)

Source from the content-addressed store, hash-verified

356}
357
358func appendSequenceDiffs(diffs []string, node1, node2 *yaml.Node) []string {
359 for i := 0; i < len(node1.Content) && i < len(node2.Content); i++ {
360 diffs = appendDiffs(diffs, node1.Content[i], node2.Content[i])
361 }
362 for i := len(node1.Content); i < len(node2.Content); i++ {
363 diffs = append(diffs, fmt.Sprintf("Node2: %v", node2.Content[i].Value))
364 }
365 for i := len(node2.Content); i < len(node1.Content); i++ {
366 diffs = append(diffs, fmt.Sprintf("Node1: %v", node1.Content[i].Value))
367 }
368 return diffs
369}
370
371func appendDiffs(diffs []string, node1, node2 *yaml.Node) []string {
372 if reflect.DeepEqual(node1, node2) {

Callers 1

DiffFunction · 0.85

Calls 1

appendDiffsFunction · 0.85

Tested by

no test coverage detected