配Mac GOLANG環境
GoSublime
package control 裡面根本安裝不了GoSublime .網上一堆亂文。
還是以官方github說明為準!!!
ofollow,noindex">https://margo.sh/b/migrate/cd /Users/didi/Library/Application Support/Sublime Text 3/Packages
然後 git clonehttps://margo.sh/GoSublime
然後 Sublime 上Comand+. 就可以使用gosublime了。
VSCODE
fn+F5 除錯 出現launch.json 頁面。 需要配置env。
"env": { "GOPATH":"/Users/didi/GoProject"},
配完以後。
出現:
Failded to continue:"Cannot find Delve debugger. Install fromhttps://github.com/derekparker/delve & ensure it is in your "GOPATH/bin" or "PATH"
接著:
go get github.com/derekparker/delve/cmd/dlv
將dlv偵錯程式放在GOPATH(工程目錄)的bin目錄下
快捷鍵如下:
F9 切換斷點
F10 Step over
F11 Step in
Shift+F11 Step out