Go Wiki: FileTreeDocumentation
このページでは、go1.13.1のソースインストールのファイルツリーについて説明します。
$ tree -d -L 2 /usr/lib/go1.13.1 | head
/usr/lib/go1.13.1
`-- go
|-- api
|-- bin
|-- doc
|-- lib
|-- misc
|-- pkg
|-- src
`-- test
$
apiには、GoのAPIチェッカーのデータが含まれています
$ ls $GOROOT/api
README go1.10.txt go1.13.txt go1.4.txt go1.7.txt go1.txt
except.txt go1.11.txt go1.2.txt go1.5.txt go1.8.txt next.txt
go1.1.txt go1.12.txt go1.3.txt go1.6.txt go1.9.txt
$
binには、goとgofmtの実行ファイルが含まれています
$ ls -l $GOROOT/bin
total 11576
-rwxr-xr-x 1 root root 9652760 Oct 2 03:02 go
-rwxr-xr-x 1 root root 2197756 Oct 2 03:02 gofmt
$
docには、.css、.go、.html、.js、.pngファイルが含まれています
libには、圧縮されたタイムゾーンデータベースが含まれています
$ tree $GOROOT/lib | head -n 5
/usr/lib/go1.13.1/go/lib
`-- time
|-- README
|-- update.bash
`-- zoneinfo.zip
$
miscには、特定のビルドモードとプラットフォームに関するファイルが含まれています
$ tree -d -L 1 $GOROOT/misc | head -n 12
/usr/lib/go1.13.1/go/misc
|-- android
|-- arm
|-- cgo
|-- chrome
|-- ios
|-- linkcheck
|-- nacl
|-- reboot
|-- swig
|-- trace
`-- wasm
$
pkgには、ライブラリ、ヘッダーファイル、コンパイル済みオブジェクトファイル、実行ファイルが含まれています
$ tree -d -L 1 $GOROOT/pkg | head -n 6
/usr/lib/go1.13.1/go/pkg
|-- include
|-- linux_386
|-- linux_386_dynlink
|-- obj
`-- tool
$
srcには、go1.13.1のソースコードが含まれています
testには、Goツールチェーンとランタイムのテストが含まれています
このコンテンツは、Go Wikiの一部です。