Does anyone know if it's possible to use the "go build" command to build from multiple files in a directory? For example
src/
file1.go
file2.go
Where file1.go contains the "func main()" method and file2 provides supporting functions. I've tried by using the following import statements but I'm getting no where
import (
"file2"
)
import (
file2 "./file2"
)
I'm wondering if this is a case that I need to modify the GOROOT environment variable to get this to work. Or if I'm just being daft and missing something blindingly obvious.
Thanks