title: Global variable private to file
body: <p>In GOLANG, Is there a way to make a variable's scope local to a file within a package?
  In my case, there are 2 files ex1.go and ex02.go. ex01.go defines a global variable</p>
  
  <pre><code>var wg sync.WaitGroup
  </code></pre>
  
  <p>which is used across functions in that file.</p>
  
  <p>In another file ex02.go (which has no relation with ex01.go except that both ex01.go and ex02.go belong to the same class of problems - i.e. concurrency), I can't define a variable for waitGroup as</p>
  
  <pre><code>var wg sync.WaitGroup
  </code></pre>
  
  <p>I get an error - "variable name is re-declared in this block"</p>
  
  <p>Is there a way to keep the variable names from spilling over to the other files?</p>