(offset string, header string, oldValue uint64, newValue uint64)
| 208 | } |
| 209 | |
| 210 | func (ui UI) displayDiffForUint64(offset string, header string, oldValue uint64, newValue uint64) { |
| 211 | if oldValue != newValue { |
| 212 | formattedOld := fmt.Sprintf("- %s%s%d", ui.TranslateText(header), offset, oldValue) |
| 213 | formattedNew := fmt.Sprintf("+ %s%s%d", ui.TranslateText(header), offset, newValue) |
| 214 | |
| 215 | if oldValue != 0 { |
| 216 | fmt.Fprintln(ui.Out, ui.modifyColor(formattedOld, color.New(color.FgRed))) |
| 217 | } |
| 218 | fmt.Fprintln(ui.Out, ui.modifyColor(formattedNew, color.New(color.FgGreen))) |
| 219 | } else { |
| 220 | fmt.Fprintf(ui.Out, " %s%s%d\n", ui.TranslateText(header), offset, oldValue) |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | func existsIn(str string, ary []string) bool { |
| 225 | for _, val := range ary { |
no test coverage detected