2 回答

TA貢獻1852條經驗 獲得超7個贊
gopls
這是官方 golang 包中分發的工具中的一個錯誤。
問題報告中的信息:
internal/lsp: use Go/cgo source files instead of generated files
Using CompiledGoFiles was causing metadata lookups to fail for cgo
packages because it includes generated files in the Go build cache
when the built-in 'go list' driver is used.? GoFiles includes both
Go and cgo original file names, allowing metadata lookups to
succeed.

TA貢獻2016條經驗 獲得超9個贊
這是 VSCode 的一個錯誤,我已經為此問題寫了一篇中等文章。
https://medium.com/@mourya.g9/setting-up-confluence-kafka-client-for-golang-with-vscode-7a27bb94220b。希望這可以幫助。

TA貢獻1821條經驗 獲得超5個贊
問題是導入之間有額外的新行,您可以嘗試以下操作:
// #cgo CFLAGS: -g -Wall
// #include <stdio.h>
// #include <stdlib.h>
// #include <string.h>
// #include "cutils.h"
import "C"
import (
? ? "bufio"
? ? "encoding/json"
// ...
)
- 2 回答
- 0 關注
- 282 瀏覽
添加回答
舉報