mirror of
https://github.com/restic/restic.git
synced 2026-10-30 12:05:42 +00:00
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.
This commit is contained in:
1 parent
ad2585af67
commit
a376323331
17 files changed
+234
-70
No files matched your search
@@ -15,7 +15,7 @@ import (
|
||||
type TextProgress struct {
|
||||
*ui.Message
|
||||
|
||||
term *termstatus.Terminal
|
||||
term ui.Terminal
|
||||
verbosity uint
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ type TextProgress struct {
|
||||
var _ ProgressPrinter = &TextProgress{}
|
||||
|
||||
// NewTextProgress returns a new backup progress reporter.
|
||||
func NewTextProgress(term *termstatus.Terminal, verbosity uint) *TextProgress {
|
||||
func NewTextProgress(term ui.Terminal, verbosity uint) *TextProgress {
|
||||
return &TextProgress{
|
||||
Message: ui.NewMessage(term, verbosity),
|
||||
term: term,
|
||||
|
||||
Reference in new issue
Block a user