mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
8c997de194
* Add reporter for CI scripts * Fix asset errors
29 lines
420 B
Go
29 lines
420 B
Go
package report
|
|
|
|
import "fmt"
|
|
|
|
type Service struct {
|
|
errors int
|
|
totalFiles int
|
|
}
|
|
|
|
func NewService() *Service {
|
|
return &Service{}
|
|
}
|
|
|
|
func (s *Service) IncErrors() {
|
|
s.errors += 1
|
|
}
|
|
|
|
func (s *Service) IncTotalFiles() {
|
|
s.totalFiles += 1
|
|
}
|
|
|
|
func (s Service) IsFailed() bool {
|
|
return s.errors > 0
|
|
}
|
|
|
|
func (s Service) GetReport() string {
|
|
return fmt.Sprintf("Total files: %d, errors: %d", s.totalFiles, s.errors)
|
|
}
|