<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>

                ## 下載 下載地址: https://golang.org/dl ![](https://img.kancloud.cn/e3/cf/e3cfed06c19f95edf5af1933bea4eb78_1450x880.png) 我這里是 windows 64 位,所以選擇 go1.15.3.windows-amd64.zip。可以選擇下載最新或者其它版本的安裝包,只要是 1.11 或以上的版本就行。 ## 安裝 解壓安裝包到安裝目錄,我這里是 D:\apps\go ![](https://img.kancloud.cn/f5/53/f553eeadebc9f2655dd3b9ef79339aef_932x589.png) ## 配置 環境變量 - GOPATH 這個變量是可選的,如果沒有設置默認是 C:\Users\當前登錄用戶\go,我是 administrator 登錄的,所以是 C:\Users\Administrator\go。可以設置這個變量,比如 D:\study\go - GO111MODULE - on - GOPROXY - https://goproxy.cn - PATH - D:\apps\go\bin - %GOPATH%\bin 如果沒設置 GOPATH 變量,則是 C:\Users\當前登錄用戶\go\bin,我是 administrator 登錄的,所以是 C:\Users\當前登錄用戶\go\bin 。如果設置了,比如 D:\study\go,則是 D:\study\go\bin ## 測試 ### 環境變量 ![](https://img.kancloud.cn/37/ef/37ef546260859bfa86bff454d90d4a0d_611x387.png) ## GOPATH\bin ```shell $ echo $GOPATH D:\xxx\study\lang\go $ go get github.com/beego/bee $ which bee /d/xxx/study/lang/go/bin/bee $ bee version 2020/12/11 11:10:34 INFO 鈻?0001 Getting bee latest version... 2020/12/11 11:10:36 WARN 鈻?0002 Update available 1.12.0 ==> 1.12.3 2020/12/11 11:10:36 WARN 鈻?0003 Run `bee update` to update 2020/12/11 11:10:36 INFO 鈻?0004 Your bee are up to date ______ | ___ \ | |_/ / ___ ___ | ___ \ / _ \ / _ \ | |_/ /| __/| __/ \____/ \___| \___| v1.12.0 鈹溾攢鈹€ Beego : Beego is not installed. Please do consider installing it first: https://github.com/astaxie/beego 鈹溾攢鈹€ GoVersion : go1.15.3 鈹溾攢鈹€ GOOS : windows 鈹溾攢鈹€ GOARCH : amd64 鈹溾攢鈹€ NumCPU : 8 鈹溾攢鈹€ GOPATH : D:\xxx\study\lang\go 鈹溾攢鈹€ GOROOT : D:\apps\go 鈹溾攢鈹€ Compiler : gc 鈹斺攢鈹€ Date : Friday, 11 Dec 2020 ``` ## go MODULE ```shell $ mkdir hello $ cd hello/ $ go mod init hello go: creating new go.mod: module hello $ cat main.go package main import "fmt" func main() { fmt.Println("Hello, World") } $ go build hello $ ll -rw-r--r-- 1 Administrator 197121 22 12月 11 11:14 go.mod -rwxr-xr-x 1 Administrator 197121 2141184 12月 11 11:18 hello.exe* -rw-r--r-- 1 Administrator 197121 80 12月 11 11:18 main.go $ ./hello.exe Hello, World ```
                  <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>

                              哎呀哎呀视频在线观看