#author("2020-01-01T02:14:01+00:00","","")
#mynavi()
#setlinebreak(on)

#TODO

* 目次 [#j4af1b33]
#contents
-- 参照
-- https://github.com/golang/go
- 関連
-- [[Goルーチンで並列HTTPリクエストを発行]]

* Go言語とは [#g7f68402]
#html(<div class="pl10">)
はオープンソースのプログラミング言語「Go」を発表しました。
Go言語はGoogleによって開発されているプログラミング言語で Linux、Mac、Window 等の主要OS 及び Android、iOS上でも動作する。(2016年現在)
※ Google App Engine でもサポートされている。
#html(</div>)

* インストール [#n5409608]
#html(<div class="pl10">)

https://golang.org/doc/install#install

** Mac の場合 [#s0ed9876]
#html(<div class="pl10">)
Homebrew でのインストールが可能
#myterm2(){{
brew install go
}}
※パッケージを落としてインストールする場合は https://golang.org/dl/ から取得
#html(</div>)

インストール時に言われた通りにPATHを通す。
$HOME/.bash_profile
#myterm2(){{
export GOPATH=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
}}

#html(</div>)

* Hello World [#f5d79ee5]
#html(<div class="pl10">)
hello.go
#mycode2(){{
package main

import "fmt"

func main() {
  fmt.Printf("Hello, World\n")
}
}}

実行
#myterm2(){{
go run hello.go
}}
#html(</div>)

* 環境変数 [#l125530b]
#html(<div class="pl10">)

| 環境変数 | 説明 |h
| GOROOT | |
| GOPATH | |
| GOOS | |
| GOARCH | |

#html(</div>)

* 基本的な構文 [#h15f181e]
#html(<div class="pl10">)
#html(</div>)

* ビルド [#ke012467]
#html(<div class="pl10">)
#html(</div>)


* Goルーチン [#nec2b113]
#html(<div class="pl10">)
[[Goルーチン]] を参照
#html(</div>)


* GoWeb [#n22d98f4]
#html(<div class="pl10">)
[[GoWebでWebアプリケーション作成]] を参照。
#html(</div>)

トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS