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:
parent
c74f4dfd85
commit
c49532f79f
@ -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...)
|
||||
|
Loading…
Reference in New Issue
Block a user