diff --git a/pkg/section/local_module.go b/pkg/section/local_module.go index 5af74b3..50f41e5 100644 --- a/pkg/section/local_module.go +++ b/pkg/section/local_module.go @@ -18,7 +18,7 @@ type LocalModule struct { } func (m *LocalModule) MatchSpecificity(spec *parse.GciImports) specificity.MatchSpecificity { - if strings.HasPrefix(spec.Path, m.Path) { + if spec.Path == m.Path || strings.HasPrefix(spec.Path, m.Path+"/") { return specificity.LocalModule{} }