Go: How does go run file.go work

前端 未结 4 1773
一个人的身影
一个人的身影 2021-01-07 19:08

The commands go build and go install compile the files into binaries. Does go run compile or interpret the file? I couldn\'t find expl

4条回答
  •  时光取名叫无心
    2021-01-07 19:47

    The go run command compiles and runs a main package comprised of the .go files specified on the command line. The command is compiled to a temporary folder.

    The go build and go install examine the files in the directory to determine which .go files are included in the main package.

提交回复
热议问题