title: Reading default FileMode when using os.O_CREATE
body: <p>I'm new to Go, have a bit of a problem with reading default file permissions / system mask. Of course I can specify fixed permissions:</p>
  
  <pre><code>f, err := os.OpenFile(fpath, os.O_CREATE|os.O_WRONLY, 0600)
  </code></pre>
  
  <p>But I would like the program to behave nicely and open a file with user's account set <code>umask</code>. How can I do that?</p>