1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00
restic/internal/ui/mock.go

23 lines
398 B
Go
Raw Normal View History

package ui
type MockTerminal struct {
Output []string
Errors []string
}
func (m *MockTerminal) Print(line string) {
m.Output = append(m.Output, line)
}
func (m *MockTerminal) Error(line string) {
m.Errors = append(m.Errors, line)
}
func (m *MockTerminal) SetStatus(lines []string) {
m.Output = append([]string{}, lines...)
}
func (m *MockTerminal) CanUpdateStatus() bool {
return true
}