diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go index 24b2585a55..3fbe3c6700 100644 --- a/src/cmd/go/internal/modload/buildlist.go +++ b/src/cmd/go/internal/modload/buildlist.go @@ -105,6 +105,7 @@ func newRequirements(depth modDepth, rootModules []module.Version, direct map[st } rs := &Requirements{ + depth: depth, rootModules: rootModules, maxRootVersion: make(map[string]string, len(rootModules)), direct: direct,