Skip to content

Commit baf4e6e

Browse files
committed
fix lint
1 parent 400a80a commit baf4e6e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

cmd/vcr-compressor/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ func main() {
1414

1515
path := os.Args[1]
1616

17-
acctest.CompressCassette(path)
17+
report, err := acctest.CompressCassette(path)
18+
if err != nil {
19+
panic(err)
20+
}
21+
22+
report.Print()
1823
}

internal/acctest/vcr_compress.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ func (report *CompressReport) AddErrorLog(log string) {
9696
report.ErrorLogs = append(report.ErrorLogs, log)
9797
}
9898

99+
func (report *CompressReport) Print() {
100+
log.Printf("On cassette: %s\n", report.Path)
101+
log.Printf("%d skipped interactions\n", report.SkippedInteraction)
102+
103+
for _, msg := range report.ErrorLogs {
104+
log.Println(msg)
105+
}
106+
}
107+
99108
func CompressCassette(path string) (CompressReport, error) {
100109
inputCassette, err := cassette.Load(path)
101110
if err != nil {

0 commit comments

Comments
 (0)