Android手機嵌入式驅動開發課程教程

來源:互聯網
上載者:User

標籤:android   style   blog   class   code   ext   

本文介紹兩種Golang的開發環境一種基於notepad++、另一種基於liteide。

1、下載Golang語言的pkg:http://golangtc.com/download

直接點擊安裝,一路next。

2、程式員必備神器notepad++開發Golang環境很簡單

一次點擊:外掛程式->Plugin Manger->Show Plugin Manger,安裝外掛程式GOnpp,重啟notepad++。

建立檔案命名為hello.go用notepad++開啟,拷貝如下代碼:

package mainimport "fmt"func main() {fmt.Println("Hello, 世界")}
依次點擊:外掛程式->GOnpp->go run;大功告成。

3、下面介紹notepad++高亮顯示golang關鍵字的方法:

語言->自訂語言->匯入檔案(C:\Go\misc\notepadplus\userDefineLang.xml要去掉開頭結尾的注釋)

拷貝C:\Go\misc\notepadplus\go.xml到C:\Program Files\Notepad++\plugins\APIs;ok,又大功告成,趕緊試一下吧。

4、接下來介紹基於整合式開發環境LiteIDE

下載解壓,直接運行搞定,記得配置GOPATH系統內容變數。

說明martini的使用:

package mainimport "github.com/go-martini/martini"func main() {m := martini.Classic()m.Get("/", func() string {return "Hello world!"})m.Run()}
採用martini搭建一個web環境。

建立檔案拷貝以上檔案到main.go中,如果直接運行會發現缺少依賴包。

採用LiteIDE的get命令擷取依賴包,就是這個按鈕。

編譯運行,程式輸出:[martini] listening on :3000

採用瀏覽器訪問一下:




聯繫我們

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