From c49532f79fcd7529d7ad1a369c467abc59d4df0a Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Fri, 9 Aug 2019 01:27:14 +0300 Subject: [PATCH] go/ast: clarify the iteration order in the comment This commit adds a comment to go/ast.MergePackageFiles that clarifies deterministic filenames iteration order. --- src/go/ast/filter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/go/ast/filter.go b/src/go/ast/filter.go index 1f2cab222f..c398e6e603 100644 --- a/src/go/ast/filter.go +++ b/src/go/ast/filter.go @@ -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...)