Hello,Go!

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。

what is Go?
什麼是Go?

Go is an expressive, concurrent, garbage-collected programming language.

Go 是一門富有表達性的,並行的,具有記憶體回收的系統程式設計語言.

Go語言的homepage  http://golang.org/

install Go compilers, tools, and libraries.

安裝Go編譯器,工具包和庫

 go tools下載地址: http://code.google.com/p/go/downloads/list

linux環境(明天搞)

windows環境 

    在win環境下Go 語言項目提供兩種安裝方式,

           1)MSI格式的安裝包,預設安裝在C:\Go\下,並且預設配置好了Go語言的環境變數和bin的path。 

                 {GOROOT  ->  C:\Go\}環境變數
                 {path  -> C:\Go\bin}  path配置

           2)zip壓縮包。解壓到任意目錄dir後,配置環境變數GOROOT->dir\Go,配置path變數dir:\Go\bin


Test your installation

測試安裝

寫一個hello world 測試安裝是否成功...

  建立一個檔案名稱為hello.go

 
package mainimport "fmt"func main() {    fmt.Printf("hello, world\n")}

開啟console,運行go run hello.go,如果你看到 "hello, world" 代表安裝成功!

(未完待續)


相關閱讀

Go Nuts http://groups.google.com/group/golang-nuts

The FAQ  http://golang.org/doc/go_faq.htm

A Tour of Go  http://tour.golang.org/#1

Go,互連網時代的C語言 http://www.infoq.com/cn/presentations/go-internet-c-lang

許式偉《Go語言編程》樣章“物件導向編程  http://www.ituring.com.cn/article/1339


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.