how does the go language distinguish packages, files, and folders?
for example, there is a file:
d:\ workspace\ www\ go_work\ src\ project_01\ hello.go
package main
import "fmt"
func main(){
fmt.Println("hello")
}
look at the tutorial and say that the program must have a main package. question:
in the above example, the file name is hello.go
, and package says main
, but there is no actual main
package. What exactly does the package mean? It doesn"t seem to be a file or folder, either, because there is no main
file or folder.