Skip to content

Commit 49ce184

Browse files
committed
cmd/guru: remove use of deprecated ssa.CreateTestMainPackage
For golang/go#48547 Change-Id: I71f061e55d52c45346d34d05ade9c82e9856d6e7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/363655 Run-TryBot: Zvonimir Pavlinovic <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> gopls-CI: kokoro <[email protected]> Trust: Zvonimir Pavlinovic <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent fda06c1 commit 49ce184

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd/guru/guru.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,14 @@ func setPTAScope(lconf *loader.Config, scope []string) error {
126126
// and their dependencies.
127127
func setupPTA(prog *ssa.Program, lprog *loader.Program, ptaLog io.Writer, reflection bool) (*pointer.Config, error) {
128128
// For each initial package (specified on the command line),
129-
// if it has a main function, analyze that,
130-
// otherwise analyze its tests, if any.
129+
// analyze the package if it has a main function.
131130
var mains []*ssa.Package
132131
for _, info := range lprog.InitialPackages() {
133132
p := prog.Package(info.Pkg)
134133

135134
// Add package to the pointer analysis scope.
136135
if p.Pkg.Name() == "main" && p.Func("main") != nil {
137136
mains = append(mains, p)
138-
} else if main := prog.CreateTestMainPackage(p); main != nil {
139-
mains = append(mains, main)
140137
}
141138
}
142139
if mains == nil {

0 commit comments

Comments
 (0)