infoMore than 3 years have passed since last update.
Goのディレクトリ構成(追記予定)
Last updated at Posted at 2019-11-01
Goのディレクトリ構成をきっちり知っておきたい
/src 開発用のディレクトリ
- プロジェクトごとにsrc 以下にディレクトリをつくる。
- ソースコード管理プラットフォームごとに切るのがGoの思想的
- go install するとpkgに実行したパッケージをコンパイルしたものが作られる。
- go buildをmainパッケージで実行すると/binに実行可能なバイナリファイルが作られる。
/bin 実行可能ファイル、バイナリ
- 環境変数PATHに設定することが推奨されている。'export PATH:=$GOPATH/bin'
/pkg コンパイルされたファイル
- srcからコンパイルされた非アプリケーション実行ファイルの.aファイル
tips
- githubからgo getするようなものは、実態としてはgit cloneとgo installである。
0Go to list of users who liked
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up