<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## Visual Studio Code vscode是微軟基于Electron和web技術構建的開源編輯器, 是一款很強大的編輯器。開源地址:[https://github.com/Microsoft/vscode](https://github.com/Microsoft/vscode) 1、安裝Visual Studio Code 最新版 官方網站:[https://code.visualstudio.com/](https://code.visualstudio.com/)下載Visual Studio Code 最新版,安裝過程略。 2、安裝Go插件 點擊右邊的 Extensions 圖標 搜索Go插件 在插件列表中,選擇 Go,進行安裝,安裝之后,系統會提示重啟 Visual Studio Code。 建議把自動保存功能開啟。開啟方法為:選擇菜單 File,點擊 Auto save。 vscode代碼設置可用于Go擴展。這些都可以在用戶的喜好來設置或工作區設置(.vscode/settings.json)。 打開首選項-用戶設置 settings.json: ~~~go { "go.buildOnSave": true, "go.lintOnSave": true, "go.vetOnSave": true, "go.buildFlags": [], "go.lintFlags": [], "go.vetFlags": [], "go.coverOnSave": false, "go.useCodeSnippetsOnFunctionSuggest": false, "go.formatOnSave": true, //goimports "go.formatTool": "goreturns", "go.goroot": "",//你的Goroot "go.gopath": "",//你的Gopath } ~~~ 接著安裝依賴包支持(網絡不穩定,請直接到 GitHub[Golang](https://github.com/golang)下載再移動到相關目錄): ~~~go go get -u -v github.com/nsf/gocode go get -u -v github.com/rogpeppe/godef go get -u -v github.com/zmb3/gogetdoc go get -u -v github.com/golang/lint/golint go get -u -v github.com/lukehoban/go-outline go get -u -v sourcegraph.com/sqs/goreturns go get -u -v golang.org/x/tools/cmd/gorename go get -u -v github.com/tpng/gopkgs go get -u -v github.com/newhook/go-symbols go get -u -v golang.org/x/tools/cmd/guru go get -u -v github.com/cweill/gotests/... ~~~ vscode 還有一項很強大的功能就是斷點調試,結合[delve](https://github.com/derekparker/delve)可以很好的進行 Go 代碼調試 ~~~go go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv brew install go-delve/delve/delve(mac可選) ~~~ 如果有問題再來一遍: ~~~go go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv ~~~ 注意:修改"dlv-cert"證書, 選擇"顯示簡介"->"信任"->"代碼簽名" 修改為: 始終信任 打開首選項-工作區設置,配置launch.json: ~~~go { "version": "0.2.0", "configurations": [ { "name": "main.go", "type": "go", "request": "launch", "mode": "debug", "remotePath": "", "port": 2345, "host": "127.0.0.1", "program": "${workspaceRoot}",//工作空間路徑 "env": {}, "args": [], "showLog": true } ] } ~~~ B1.vscode 安裝 sftp插件 ##### 2\. 創建sftp配置 使用 ctrl+shift+p 快捷鍵調出輸入框,選擇 SFTP:Config 回車 會在 **.vscode** 目錄下創建一個 sftp.json 配置文件,配置如下 ~~~ { ? ?"name": "myserver", ? ?"host": "192.168.2.111", ? ? ? ?"port": 22, ? ? ? ?"username": "root", ? ?"password": "xxxx", ? ?"protocol": "sftp", ? ?"passive": false, ? ?"interactiveAuth": false, ? ?"remotePath": "/usr/share/nginx/mwServer/web/laravel/", ? ? ?"uploadOnSave": true, ? ?"syncMode": "update", ? ?"ignore": [ ? ? ? ? ? ? ? ? ? ?"**/.vscode/**", ? ? ? ?"**/.git/**", ? ? ? ?"**/.DS_Store" ? ] } ~~~ ##### 3\. 上傳本地代碼到服務器 使用 ctrl+shift+p 快捷鍵調出輸入框,選擇 SFTP:Upload 回車 本地的項目代碼就可以上傳到服務器了 現在修改本地代碼 **ctrl+s** 保存,即可同步到服務器了
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看