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

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/.

主站蜘蛛池模板: 黑山县| 南华县| 乐东| 岚皋县| 福鼎市| 石楼县| 芦山县| 济南市| 合作市| 溧阳市| 临夏县| 临安市| 勐海县| 集安市| 沾益县| 涪陵区| 鄂托克前旗| 读书| 姜堰市| 河间市| 玉山县| 云浮市| 峨山| 阿尔山市| 西华县| 洛扎县| 通化县| 上饶市| 柳江县| 华安县| 五莲县| 东阿县| 富蕴县| 甘谷县| 彭泽县| 龙海市| 陇川县| 竹溪县| 灌阳县| 广南县| 晋宁县|