This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
golang.org/x/tools/gopls version need to update #2886
Closed
Description
openedon Nov 5, 2019
The golang package version has been updated
/home/alpha/works/pkg/mod/golang.org/x/tools/gopls@v0.1.7/main.go:20:41: not enough arguments in call to cmd.New
have (string, string, nil)
want (string, string, []string, func(*source.Options))
original (v0.1.7)
// https://github.com/golang/tools/blob/gopls/v0.1.7/gopls/main.go#L20
tool.Main(context.Background(), cmd.New("gopls", "", nil), os.Args[1:])
latest
// https://github.com/golang/tools/blob/master/gopls/main.go#L22
tool.Main(ctx, cmd.New("gopls", "", nil, hooks.Options), os.Args[1:])
Library
original (v0.1.7)
https://github.com/golang/tools/blob/gopls/v0.1.7/internal/lsp/cmd/cmd.go#L71
func New(name, wd string, env []string) *Application {
if wd == "" {
wd, _ = os.Getwd()
}
app := &Application{
cache: cache.New(),
name: name,
wd: wd,
env: env,
OCAgent: "off", //TODO: Remove this line to default the exporter to on
}
return app
}
latest
// https://github.com/golang/tools/blob/master/internal/lsp/cmd/cmd.go#L75
// latest
func New(name, wd string, env []string, options func(*source.Options)) *Application {
if wd == "" {
wd, _ = os.Getwd()
}
app := &Application{
cache: cache.New(options),
name: name,
wd: wd,
env: env,
OCAgent: "off", //TODO: Remove this line to default the exporter to on
}
return app
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels