2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-23 21:27:34 +00:00
restic/internal/ui/terminal.go
Michael Terry a376323331 restore: print JSON versions of errors in --json mode
Previously, they were printed as freeform text.

This also adds a ui.Terminal interface to make writing
tests easier and also adds a few tests.
2024-08-03 15:18:46 -04:00

11 lines
274 B
Go

package ui
// Terminal is used to write messages and display status lines which can be
// updated. See termstatus.Terminal for a concrete implementation.
type Terminal interface {
Print(line string)
Error(line string)
SetStatus(lines []string)
CanUpdateStatus() bool
}