github.com/daixiang0/gci@v0.13.0/pkg/section/blank.go (about) 1 package section 2 3 import ( 4 "github.com/daixiang0/gci/pkg/parse" 5 "github.com/daixiang0/gci/pkg/specificity" 6 ) 7 8 type Blank struct{} 9 10 const BlankType = "blank" 11 12 func (b Blank) MatchSpecificity(spec *parse.GciImports) specificity.MatchSpecificity { 13 if spec.Name == "_" { 14 return specificity.NameMatch{} 15 } 16 return specificity.MisMatch{} 17 } 18 19 func (b Blank) String() string { 20 return BlankType 21 } 22 23 func (b Blank) Type() string { 24 return BlankType 25 }