internal/frontend: don't fetch licenses in fetchMainDetails
We don't need licenses in fetchMainDetails. GetUnit is now called only
with the relevant fields.
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -79,7 +79,7 @@ type Subdirectory struct {
}
func fetchMainDetails(ctx context.Context, ds internal.DataSource, um *internal.UnitMeta, expandReadme bool) (_ *MainDetails, err error) {
- unit, err := ds.GetUnit(ctx, um, internal.AllFields)
+ unit, err := ds.GetUnit(ctx, um, internal.WithReadme|internal.WithDocumentation|internal.WithSubdirectories|internal.WithImports)
if err != nil {
return nil, err
}
