官术网_书友最值得收藏!

The Go toolchain

The go executable is the main application of the Go toolchain. You can pass a command to go, and it will take the appropriate action. The toolchain has tools to run, compile, format source code, download dependencies, and more. Let's look at the full list, which is obtained as an output from the go help command or just go by itself:

  • build: This compiles packages and dependencies
  • clean: This removes object files
  • doc: This shows documentation for a package or symbol
  • env: This prints Go environment information
  • generate: This is the code generator
  • fix: This upgrades Go code when a new version is released
  • fmt: This runs gofmt on package sources
  • get: This downloads and installs packages and dependencies
  • help: This provides more help on a specific topic
  • install: This compiles and installs packages and dependencies
  • list: This lists packages
  • run: This compiles and runs Go programs
  • test: This runs unit tests and benchmarks
  • vet: This examines source code for bugs
  • version: This shows the Go version

More information about these commands is available at https://golang.org/cmd/.

主站蜘蛛池模板: 镇赉县| 会东县| 尉犁县| 唐河县| 衢州市| 松滋市| 遵义市| 常山县| 正蓝旗| 陵川县| 越西县| 昔阳县| 孟连| 城口县| 宁乡县| 西华县| 沧源| 佛山市| 桦川县| 德令哈市| 五指山市| 辛集市| 五台县| 钟祥市| 龙山县| 华蓥市| 元江| 宁国市| 施甸县| 长治市| 封丘县| 景泰县| 张北县| 伊金霍洛旗| 赤壁市| 正镶白旗| 余干县| 鄂托克前旗| 平湖市| 泗水县| 德化县|