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

#TODO

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

* 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]
* 基本的な構文など [#jed80257]
#html(<div class="pl10">)

#TODO

** パッケージ [#c9143e5f]
#html(<div class="pl10">)
#html(</div>)

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

** 定数 [#s07e7f3c]
#html(<div class="pl10">)
#html(</div>)

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

** 繰り返し [#i8ffcf5f]
#html(<div class="pl10">)
#html(</div>)

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

#TODO(defer)

#html(</div>)

** 構造体 [#y10ca1f9]
#html(<div class="pl10">)
#html(</div>)

** 型宣言 [#v147f939]
#html(<div class="pl10">)
#html(</div>)

**インターフェース [#p9191eb1]
#html(<div class="pl10">)
#html(</div>)

** 例外処理 [#z50427ec]
#html(<div class="pl10">)
#html(</div>)

#html(</div>)

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

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


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