Go has no concept of subdirectories and subpackages. Packages are separated from each other. The import path "foo/utils" is just an import path (package search method) - the string "foo/utils" has no meaning other than locating the package on a local disk or on the Internet.
foo cannot access private members of foo/utils .
In Go1, each directory in the source tree corresponds to one package. You can learn more about this here: go command .
user811773
source share