第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

gopls 為 github.com/Shopify/sarama 返回錯(cuò)誤“gopls:

gopls 為 github.com/Shopify/sarama 返回錯(cuò)誤“gopls:

Go
精慕HU 2022-11-28 14:41:30
我已經(jīng)檢查了(在 commit 處)的main分支,但我注意到在 VS Code 中我不能像往常一樣“轉(zhuǎn)到定義”。如果我將鼠標(biāo)懸停在 中的包名稱上,我會(huì)收到 linter 警告github.com/Shopify/sarama947343309601b4eb3c2fa3e7d15d701b503dd491 saramafunctional_consumer_group_test.goNo packages found for open file /Users/kurtpeek/go/src/github.com/Shopify/sarama/functional_consumer_group_test.go: <nil>.If this file contains build tags, try adding "-tags=<build tag>" to your gopls "buildFlags" configuration (see (https://github.com/golang/tools/blob/master/gopls/doc/settings.md#buildflags-string).Otherwise, see the troubleshooting guidelines for help investigating (https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md).go list(見下面的截圖)。從命令行,如果我嘗試訪問gopls該文件,我會(huì)收到類似的錯(cuò)誤:> gopls check functional_consumer_group_test.go gopls: no packages returned: packages.Load error我懷疑這與該文件中的構(gòu)建約束(https://pkg.go.dev/cmd/go#hdr-Build_constraints)有關(guān),來自https://github.com/Shopify/sarama/blob/947343309601b4eb3c2fa3e7d15d701b503dd491 /functional_consumer_group_test.go#L1-L2,//go:build functional// +build functional但是,我不清楚如何修改我的 VS 代碼settings.json以通過這些構(gòu)建約束。有誰知道如何構(gòu)建這個(gè)功能測(cè)試?
查看完整描述

2 回答

?
天涯盡頭無女友

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超9個(gè)贊

https://www.ryanchapin.com/configuring-vscode-to-use-build-tags-in-golang-to-separate-integration-and-unit-test-code/之后,我不得不.vscode/settings.json在存儲(chǔ)庫(kù)的根目錄并添加以下內(nèi)容:

{

    "go.buildFlags": [

        "-tags=functional"

    ],

    "go.testTags": "functional",

}

現(xiàn)在 VS Code 在該文件中正常工作:

http://img1.sycdn.imooc.com//6384584b00019a4f10190568.jpg

查看完整回答
反對(duì) 回復(fù) 2022-11-28
?
米琪卡哇伊

TA貢獻(xiàn)1998條經(jīng)驗(yàn) 獲得超6個(gè)贊

你試過go clean -cache嗎?

此鏈接可能會(huì)有所幫助: https ://github.com/golang/go/issues/42353


查看完整回答
反對(duì) 回復(fù) 2022-11-28
  • 2 回答
  • 0 關(guān)注
  • 563 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)