I thought I had this figured out but must be missing something.
main file: test/test.go
package main
I then created another file in the same folder called test2.go and added a single variable to it.
It also has package main in it at top of file.
I thought because they were in same folder with same package name that I could call things in them but it is not working. So the variable I defined in the test2.go main package isn’t seen in the test.go file main package.
I didn’t realize I needed to list each file in the folder. All documentation I’ve read and examples just says it uses whatever is in the folder that shares that package name.
ok, so to be clear, if I have separate files that I break apart within the “main” package folder then I will need to list them specifically when compiling. But if I include a folder into a main package and that folder happens to have 10 files in it, they do NOT need to be listed individually?
Kinda surprising it works like that but just as long as I know.