Golang はじめました
だいぶ出遅れましたが、ようやく Golang の勉強をはじめました。
備忘録的に書いていきたいと思います。
Golang とは?
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
The Go Programming Language
以下のような特徴があります。
Golang のインストール
OS X に homebrew でインストールしました。
$ brew install go $ go version go version go1.6.2 darwin/amd64
$ mkdir -p $HOME/go $ echo 'export GOPATH="$HOME/go"' >> $HOME/.bash_profile $ . $HOME/.bash_profile
Golang で Hello, World
コード(hello.go)
package main import ( "fmt" ) func main() { fmt.Println("Hello, World!") }
実行
$ go run hello.go Hello, World!