上QQ阅读APP看书,第一时间看更新
Building multiple Go files
If a program is split into multiple files, you can pass all of them to the build command. For example, if you have a main.go file and an utility.go file containing extra functions, you could build them by running the following command:
go build main.go utility.go
If you tried to build main.go by itself, it would not be able to find the references to the functions in utility.go.