Go のプロジェクトのディレクトリ構成などについて プロジェクト構成 プロジェクトディレクトリをgo_workとする。 go_work ├── bin -> go install 時にバイナリが格納される ├── pkg -> 依存パッケージのオブジェクトファイル格納場所 └── src -> ソースコード格納場所 上記3つのディレクトリがあることが前提。 環境変数$GOPATHにプロジェクトディレクトリを指定することで、依存パッケージの解決が自動的に行われる。 % cd go_work % export GOPATH=`pwd` パッケージについて Go のパッケージは、Ruby で言うところの gem にあたる。 パッケージは自分で作ったり、Git などでリポジトリが公開されていれば、それをgo get コマンドでコピーして利用できる。 パッケージの作成 gosample というパッケ