(d Diff, path []interface{}, long bool)
| 48 | } |
| 49 | |
| 50 | func 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 | |
| 63 | func formatSlice(s slice, path []interface{}, long bool) string { |
| 64 | output := strings.Builder{} |
no test coverage detected