Fix final nits from noticeindex change.
Test: m droid dist cts alllicensemetadata Change-Id: Ie446e5693a09f4ae1c936cdae6f1e668105541f0
This commit is contained in:
@@ -231,14 +231,12 @@ func (ni *NoticeIndex) Hashes() chan hash {
|
||||
|
||||
// InputFiles returns the complete list of files read during indexing.
|
||||
func (ni *NoticeIndex) InputFiles() []string {
|
||||
licenseMeta := []string(nil)
|
||||
for f := range ni.lg.targets {
|
||||
licenseMeta = append(licenseMeta, f)
|
||||
}
|
||||
projectMeta := ni.pmix.AllMetadataFiles()
|
||||
files := make([]string, 0, len(ni.files) + len(licenseMeta) + len(projectMeta))
|
||||
files := make([]string, 0, len(ni.files) + len(ni.lg.targets) + len(projectMeta))
|
||||
files = append(files, ni.files...)
|
||||
files = append(files, licenseMeta...)
|
||||
for f := range ni.lg.targets {
|
||||
files = append(files, f)
|
||||
}
|
||||
files = append(files, projectMeta...)
|
||||
return files
|
||||
}
|
||||
|
@@ -233,7 +233,7 @@ func (ix *Index) MetadataForProjects(projects ...string) ([]*ProjectMetadata, er
|
||||
|
||||
// AllMetadataFiles returns the sorted list of all METADATA files read thus far.
|
||||
func (ix *Index) AllMetadataFiles() []string {
|
||||
files := []string(nil)
|
||||
var files []string
|
||||
ix.projects.Range(func(key, value any) bool {
|
||||
pi := value.(*projectIndex)
|
||||
if pi.path != "" {
|
||||
|
Reference in New Issue
Block a user