github.com/daixiang0/gci@v0.13.0/pkg/analyzer/errors.go (about) 1 package analyzer 2 3 import "fmt" 4 5 type InvalidNumberOfFilesInAnalysis struct { 6 expectedNumFiles, foundNumFiles int 7 } 8 9 func (i InvalidNumberOfFilesInAnalysis) Error() string { 10 return fmt.Sprintf("Expected %d files in Analyzer input, Found %d", i.expectedNumFiles, i.foundNumFiles) 11 } 12 13 func (i InvalidNumberOfFilesInAnalysis) Is(err error) bool { 14 _, ok := err.(InvalidNumberOfFilesInAnalysis) 15 return ok 16 }