0
0

More 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である。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0