From ff891bb6d87210f007cc770c077278020c68df4b Mon Sep 17 00:00:00 2001 From: Jason Song Date: Mon, 4 May 2020 23:36:46 +0800 Subject: [PATCH] cmd/wire: simplify gather append (#248) --- cmd/wire/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/wire/main.go b/cmd/wire/main.go index 36c06e9..f3b153e 100644 --- a/cmd/wire/main.go +++ b/cmd/wire/main.go @@ -399,9 +399,7 @@ func gather(info *wire.Info, key wire.ProviderSetID) (_ []outGroup, imports map[ if curr.VarName != "" && !(curr.PkgPath == key.ImportPath && curr.VarName == key.VarName) { imports[formatProviderSetName(curr.PkgPath, curr.VarName)] = struct{}{} } - for _, imp := range curr.Imports { - next = append(next, imp) - } + next = append(next, curr.Imports...) } // Depth-first search to build groups.