title: Open a file in the same directory as the .go source file in Go
body: <p>When in a source file $PWD/dir/src.go I use</p>
  
  <pre><code>os.Open("myfile.txt")
  </code></pre>
  
  <p>it looks for myfile.txt in $PWD (which looks normal).</p>
  
  <p>Is there way to tell Go to look for myfile.txt in the same directory as src.go ? I need something like <code>__FILE__</code> in Ruby.</p>