title: Open file with path needing character escaping in Go
body: <p>I have a file which <code>os.open()</code> gives me back, <code>no such file or directory</code>. Is there a function which can escape a file name for getting the correct  path to it? Something similar to the net package <code>QueryEscape</code> ?, but for file paths of course</p>
  
  <p>Here is the Path name <code>"Music/3OH!3 - Streets Of Gold 2010 [Cov+CD][Bubanee]/06. Touchin On My - 30H!3.mp3"</code></p>
  
  <p>I'm just using a simple </p>
  
  <pre><code>srcName := "Music/3OH!3 - Streets Of Gold 2010 [Cov+CD][Bubanee]/06. Touchin On My - 30H!3.mp3"
  src, err := os.Open(srcName)
  if err != nil {
      fmt.Println(err)
      return
  }
  </code></pre>
  
  <p>The file does exist btw, go just cant follow the path name. The path that bash can follow is <code>Music/3OH\!3\ -\ Streets\ Of\ Gold\ \[Cov+CD\]\[Bubanee\]/12.\ Strrets\ Of\ Gold\ -\ 30H\!3.mp3</code> which shows all the escaping that is needed. </p>