I decided to structure the code and divide it into packages.
It turned out that the Main package is divided into several files in a directory and contains Пакет1.1 and this package contains Пакет 2.1 . As a result, mistakes are made due to the fact that something is written incorrectly.
Tell me examples with nested packages located in the application itself (that is, not installed in the shared folder) I connect with params "./Packages/Params/" structure is approximately:

 main.go (несколько файлов пакета main в одной папке) -Packages --PackagesGroup1 ---package1.go ---SubPackagesGroup1 ----subpackage1.go --PackagesGroup2 ---package2.go 

    1 answer 1

    You need to write complete package paths relative to $GOPATH/src .
    Importing a package higher level in GO

    • Although the link can find the answer to the question, it is better to point out the most important thing here, and give the link as a source. If the page to which the link leads will be changed, the response link may become invalid. - From the queue of checks - iluxa1810
    • I see no reason to duplicate the answer. The question should be closed as a double and give a link to the first option or give a short answer and a link to a more complete description (which I did). - rekby