I have several .go files in a folder and functions can be referenced when I run them as "go run ." so all the .go files get compiled.
But I don't know how to do this inside the GoLand IDE. I'd especially like to be able to debug this code so running inside the GoLand IDE would be nice.
main2.go contains
func main2()
Which I can reference from main.go with
main2()
This works perfectly when run as "go run ." or "go run *.go" but "go run main.go" doesn't compile main2.go so the reference to main2() is not resolved and causes
./main.go:29:2: undefined: main2
And the GoLand IDE gets the same error when I try to run main.go. I guess I just don't know how to tell the GoLand IDE to compile all the .go files before linking and execution...
Any suggestions are very much appreciated!
