(offset string, header string, oldValue types.NullInt, newValue types.NullInt)
| 147 | } |
| 148 | |
| 149 | func (ui UI) displayDiffForNullInt(offset string, header string, oldValue types.NullInt, newValue types.NullInt) { |
| 150 | if oldValue != newValue { |
| 151 | formattedOld := fmt.Sprintf("- %s%s%d", ui.TranslateText(header), offset, oldValue.Value) |
| 152 | formattedNew := fmt.Sprintf("+ %s%s%d", ui.TranslateText(header), offset, newValue.Value) |
| 153 | |
| 154 | if oldValue.IsSet { |
| 155 | fmt.Fprintln(ui.Out, ui.modifyColor(formattedOld, color.New(color.FgRed))) |
| 156 | } |
| 157 | fmt.Fprintln(ui.Out, ui.modifyColor(formattedNew, color.New(color.FgGreen))) |
| 158 | } else { |
| 159 | fmt.Fprintf(ui.Out, " %s%s%d\n", ui.TranslateText(header), offset, oldValue.Value) |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | func (ui UI) displayDiffForString(offset string, header string, hiddenValue bool, oVal string, nVal string) { |
| 164 | if oVal != nVal { |
no test coverage detected