1
0
mirror of https://github.com/golang/go synced 2024-09-30 00:24:29 -06:00

go/ast: clarify the iteration order in the comment

This commit adds a comment to go/ast.MergePackageFiles that clarifies
deterministic filenames iteration order.
This commit is contained in:
Ivan Trubach 2019-08-09 01:27:14 +03:00
parent c74f4dfd85
commit c49532f79f

View File

@ -474,6 +474,7 @@ func MergePackageFiles(pkg *Package, mode MergeMode) *File {
}
}
} else {
// Iterate over filenames for deterministic order.
for _, filename := range filenames {
f := pkg.Files[filename]
imports = append(imports, f.Imports...)