-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsilent.go
More file actions
37 lines (27 loc) · 919 Bytes
/
Copy pathsilent.go
File metadata and controls
37 lines (27 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package progress
import (
"context"
"io"
)
type SilentReporter struct{}
func NewSilentReporter() *SilentReporter {
return &SilentReporter{}
}
func (pr SilentReporter) StartReportableActivity(ctx context.Context, summary string, expectedItems int) {
}
func (pr SilentReporter) StartReportableReaderActivityInBytes(ctx context.Context, summary string, exepectedBytes int64, inputReader io.Reader) io.Reader {
return inputReader
}
func (pr SilentReporter) IncrementReportableActivityProgress(ctx context.Context, incrementBy int) {
}
func (pr SilentReporter) CompleteReportableActivityProgress(ctx context.Context, summary string) {
}
func (pr SilentReporter) CollectError(context.Context, error) bool {
return true
}
func (pr SilentReporter) MaxErrorsCollected(context.Context) bool {
return false
}
func (pr SilentReporter) CollectWarning(ctx context.Context, code, message string) bool {
return true
}