I\'m a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size.
go r
Unix related systems
go run *.go will be sufficient in most cases.
Continue to the below method if this causes errors.
Windows systems (and in other cases where go run *.go doesn't work)
Token expansion doesn't work in the windows command line and hence the above will not work and display an error. go run *.go may also not work in OSs in some cases due to current compiler limitations.
In these cases, use
go build && foo.exe
where foo.exe is the name of the .exe file produced.
If perhaps you have no idea what the name of your executable is, first
go build and check the name of the .exe file produced. Afterwards, use the method that includes the file name.
These 2 methods will build and run all the .go files within your current directory with minimum fuss.