<label id="hd0lb"><video id="hd0lb"></video></label><code id="hd0lb"><rp id="hd0lb"></rp></code>

        <table id="hd0lb"></table>

        1. <pre id="hd0lb"><label id="hd0lb"></label></pre>

          葵花寶典教程,一個自學編程平臺

          葵花寶典教程,一個自學編程平臺

          goland使用go mod模式

          使用go mod之后,想要在goland中有代碼提示,有兩種方式,一種是使用gopath下的goimport工具,另一種是使用gomod自身的管理工具

          我是用的是非gopath的方式,每次新建項目后總是報錯

          go list -m: can‘t compute ‘all‘ using the vendor directory
          (Use -mod=mod or -mod=readonly to bypass.),

          得不到想要的效果,最后終于發現是步驟不對

          第一步:創建空文件夾

          第二步:goland以項目方式打開文件夾

          第三步:設置goland中的配置,goroot,gomodule


          1-1.png

          第四步:執行go mod init + 項目名,這個截圖的地方多一個go modules,用于存放下載的包的


          2-2.png

          第五步:創建.go文件,然后寫上代碼

          第六步:執行go mod tidy,下載所需的包,也會刪除多余的包


          第6條葵花寶典
          == ==

          Copyright www.holyholla.com Rights Reserved葵花寶典教程.鄂icp2022001145號-1

          分享:

          支付寶

          微信

          美女日本一区
          <label id="hd0lb"><video id="hd0lb"></video></label><code id="hd0lb"><rp id="hd0lb"></rp></code>

              <table id="hd0lb"></table>

              1. <pre id="hd0lb"><label id="hd0lb"></label></pre>