title: how do I check for errors when calling os.Open(<filename>) in Go?
body: <p>I'm new to Go (spent 30mins so far!) and am trying to do File I/O.</p>
  
  <pre><code>  file, ok := os.Open("../../sample.txt")
    if ok != nil {
      // error handling code here
      os.Exit(1)
    }
    ... 
  </code></pre>
  
  <p>When the call fails, shouldn't it return an error number? This call returns os.Error and it has no methods other than 'String()'. </p>
  
  <p>Is this the <em>recommended</em> way to check for errors in Go? </p>