title: Go and namespaces: is it possible to achieve something similar to Python?
body: <p>I wonder if there is a way to use namespaces in the Go language in a similar way as Python does.</p>
  
  <p>In Python if I have the following files containing functions:</p>
  
  <pre><code>/a.py
      def foo():
  /b.py
      def bar():
  </code></pre>
  
  <p>I can access <code>foo</code> and <code>bar</code> in a third Python file as following:</p>
  
  <pre><code>import a
  a1 = a.foo()
  import b
  b1 = b.bar()
  </code></pre>
  
  <p>I had some difficulties finding some documentation on namespaces with the Go language.
  How are namespaces implemented in go? With <code>package</code> and <code>import</code>? Or is <code>import</code> dedicated to external libraries?</p>
  
  <p>I think I understood that for each package there should be a dedicated directory. I wonder if this is absolutely mandatory, because it can become impractical whenever a high granularity of modules is the best way to engineer a certain idea. In other words, I would like to avoid using one directory per package (for internal use).</p>