golang/go

x/tools/gopls: bad completion with syntax errors

オープン

#39,721 opened on 2020/06/19

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)Go (19,008 件のフォーク)batch import
Toolsgoplsgopls/parsinghelp wanted

Repository metrics

Stars
 (133,883 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.14.3 darwin/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.46.0
    • a5d1cc28bb5da32ec67e86cc50f84c67cc690321
    • x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.14.4

full code:

package main

import "fmt"

type result struct {
	value interface{}
	err   error
}

func getResult() (interface{}, error) {
	return "test", nil
}

func main() {
	var res result
	res.value, res.err = getResult()
	fmt.Println(res)
}

When I type "res.", I expect "err" will appear.

But now the code completion stop working, I have to type "err" manually.

Please fix the bug, thanks.

コントリビューターガイド