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

Function formatDiff

cft/diff/format.go:50–61  ·  view source on GitHub ↗
(d Diff, path []interface{}, long bool)

Source from the content-addressed store, hash-verified

48}
49
50func formatDiff(d Diff, path []interface{}, long bool) string {
51 switch v := d.(type) {
52 case slice:
53 return formatSlice(v, path, long)
54 case dmap:
55 return formatMap(v, path, long)
56 case value:
57 return v.Format(long)
58 default:
59 panic(fmt.Errorf("unexpected type '%T'", d))
60 }
61}
62
63func formatSlice(s slice, path []interface{}, long bool) string {
64 output := strings.Builder{}

Callers 1

formatSubFunction · 0.85

Calls 3

formatSliceFunction · 0.85
formatMapFunction · 0.85
FormatMethod · 0.65

Tested by

no test coverage detected