You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue tracks all of the workarounds implemented in gopls to handle places where go/parser loses information. Most of this code can be found in golang.org/x/tools/internal/lsp/cache/parse.go and was written by @muirdm.
The current list of workarounds includes handling:
Missing curly braces in if statements (if foo -> if foo {})
Missing selectors (x. -> x._)
Partial identifiers that are keywords (foo.var -> foo._)
Missing conditional statements in if statements with initialization statements (if i := 0)
Unexpected array types ([]int -> []int{})
Incomplete go or defer statements (go foo -> go foo()).
Dangling selectors in go or defer statements
go foo.
y:=1
becomes
gofoo._y:=1
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Feb 25, 2020
This issue tracks all of the workarounds implemented in
gopls
to handle places where go/parser loses information. Most of this code can be found ingolang.org/x/tools/internal/lsp/cache/parse.go
and was written by @muirdm.The current list of workarounds includes handling:
if
statements (if foo
->if foo {}
)x.
->x._
)foo.var
->foo._
)if
statements with initialization statements (if i := 0
)[]int
->[]int{}
)go
ordefer
statements (go foo
->go foo()
).go
ordefer
statementsbecomes
The text was updated successfully, but these errors were encountered: