github.com/yoheimuta/protolint@v0.49.8-0.20240515023657-4ecaebb7575d/internal/linter/report/reporters/plainReporter.go (about) 1 package reporters 2 3 import ( 4 "fmt" 5 "io" 6 7 "github.com/yoheimuta/protolint/linter/report" 8 ) 9 10 // PlainReporter prints failures as it is. 11 type PlainReporter struct{} 12 13 // Report writes failures to w. 14 func (r PlainReporter) Report(w io.Writer, fs []report.Failure) error { 15 for _, failure := range fs { 16 _, err := fmt.Fprintln(w, failure) 17 if err != nil { 18 return err 19 } 20 } 21 return nil 22 }