Skip to content

Commit 303af2a

Browse files
committed
Module: HasProject
1 parent 4fef591 commit 303af2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modload/module.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ func (p Module) Projects() []*modfile.Project {
197197
return p.Opt.Projects
198198
}
199199

200+
func (p Module) HasProject() bool {
201+
return len(p.Opt.Projects) > 0
202+
}
203+
200204
func hasGopExtended(opt *modfile.File) bool {
201205
return len(opt.Projects) > 0 || len(opt.Import) > 0
202206
}

0 commit comments

Comments
 (0)