Go語言入門系列1:安裝,How to Write Go Code

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。https://golang.org/doc/code.htmlsrc contains Go source files,pkg contains package objects, andbin contains executable commands.The go tool builds source packages and installs the resulting binaries to the pkg and bin directories.需要先設定:The GOPATH  specifies the location of your workspace. GOPATH must not be the same path as your Go installation.安裝下載https://golang.org/dl/如 https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gztar -C /usr/local/ -xzf go1.8.3.linux-amd64.tar.gzexport PATH=$PATH:/usr/local/go/bin GOROOT must be set when installing to a custom location. 所以最好安裝在/usr/local目錄下為什麼要使用 Go 語言?Go 語言的優勢在哪裡?部署簡單。我發現我花了四年時間錘鍊自己用 C 語言構建系統的能力,試圖找到一個規範,可以更好的編寫軟體。結果發現只是對 Go 的模仿。缺乏語言層面的支援,只能是一個拙劣的模仿。對於大多數後台應用情境,選擇Golang是極為明智的選擇。 如果你是C愛好者,強烈建議你學習和使用Go。Go可以調用C/C++程式你用來學89個C++進階特性的時間,估計已經用Go寫了64個開源項目了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.