diff --git a/gopls/internal/govulncheck/README.md b/gopls/internal/govulncheck/README.md index d8339c506f..bc10d8a2ec 100644 --- a/gopls/internal/govulncheck/README.md +++ b/gopls/internal/govulncheck/README.md @@ -15,3 +15,5 @@ The `copy.sh` does the copying, after removing all .go files here. To use it: 2. cd to this directory. 3. Run `copy.sh`. + +4. Re-add build tags for go1.18 \ No newline at end of file diff --git a/gopls/internal/govulncheck/source.go b/gopls/internal/govulncheck/source.go index 23028b9eb4..d51fe8c0c2 100644 --- a/gopls/internal/govulncheck/source.go +++ b/gopls/internal/govulncheck/source.go @@ -8,13 +8,11 @@ package govulncheck import ( - "context" "fmt" "sort" "strings" "golang.org/x/tools/go/packages" - "golang.org/x/vuln/client" "golang.org/x/vuln/vulncheck" ) @@ -57,26 +55,6 @@ func LoadPackages(cfg *packages.Config, patterns ...string) ([]*vulncheck.Packag return vpkgs, err } -// Source calls vulncheck.Source on the Go source in pkgs. It returns the result -// with Vulns trimmed to those that are actually called. -// -// This function is being used by the Go IDE team. -func Source(ctx context.Context, pkgs []*vulncheck.Package, c client.Client) (*vulncheck.Result, error) { - r, err := vulncheck.Source(ctx, pkgs, &vulncheck.Config{Client: c}) - if err != nil { - return nil, err - } - // Keep only the vulns that are called. - var vulns []*vulncheck.Vuln - for _, v := range r.Vulns { - if v.CallSink != 0 { - vulns = append(vulns, v) - } - } - r.Vulns = vulns - return r, nil -} - // CallInfo is information about calls to vulnerable functions. type CallInfo struct { // CallStacks contains all call stacks to vulnerable functions.