github.com/daixiang0/gci@v0.13.0/pkg/section/alias.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 Alias struct{} 9 10 const AliasType = "alias" 11 12 func (b Alias) MatchSpecificity(spec *parse.GciImports) specificity.MatchSpecificity { 13 if spec.Name != "." && spec.Name != "_" && spec.Name != "" { 14 return specificity.NameMatch{} 15 } 16 return specificity.MisMatch{} 17 } 18 19 func (b Alias) String() string { 20 return AliasType 21 } 22 23 func (b Alias) Type() string { 24 return AliasType 25 }