- Security with Go
- John Daniel Leon
- 72字
- 2021-06-30 19:06:43
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.