title: Can I develop a go package in multiple source directories?
body: <p>I am developing a go package, which is a little bit complex and thus I want to organize the source code into multiple directories.</p>
  
  <p>However, I don't want the users of the package to have to use too long imports. Anyways, the internal structure of the package isn't their concern.</p>
  
  <p>Thus, my package structure looks so:</p>
  
  <pre><code>subDir1
    subSubDir1
    subSubDir2
  subDir2
    subSubDir3
  </code></pre>
  
  <p>...and so on. All of them have their exported calls.</p>
  
  <p>I would like to avoid that my users have to import</p>
  
  <pre><code>import (
    "mypackage/subDir1"
    "mypackage/subDir1/subSubDir2"
  )
  </code></pre>
  
  <p>...and so on.</p>
  
  <p>I only want, if they want to use an exported function from my package, they should have access all of them by simply importing <code>mypackage</code>.</p>
  
  <p>I tried that I declare <code>package mypackage</code> in all of the <code>.go</code> files. Thus, I had source files in different directories, but with the same package declaration.</p>
  
  <p>In this case, the problem what I've confronted was that I simply couldn't import multiple directories from the same package. It said:</p>
  
  <pre><code>./src1.go:6:15: error: redefinition of ‘mypackage’
     "mypackage/mysubdir1"
                 ^
  ./src1.go:4:10: note: previous definition of ‘mypackage’ was here
     "mypackage"
            ^
  ./src1.go:5:15: error: redefinition of ‘mypackage’
     "mypackage/mysubdir2"
                 ^
  ./src1.go:4:10: note: previous definition of ‘mypackage’ was here
     "mypackage"
            ^
  </code></pre>
  
  <p>Is it somehow possible?</p>