Passing an *os.File as an *io.Reader : <p>If there's a function that takes a *io.Reader, how would one pass an *io.File?  This doesn't work:</p>

<pre><code>func somefunc(r *io.Reader){
}

func Test_FileReader(t *testing.T){
    f, err := os.Open("xyz")
    assert.NoError(t, err)

    somefunc(&amp;f)
}
</code></pre>

<p>It gives this error:</p>

<blockquote>
  <p>Cannot use '&amp;f' (type **File) as type *io.Reader</p>
</blockquote>

<p>Then, changing <code>*io.Reader</code>-><code>io.Reader</code> and <code>&amp;f</code>-><code>f</code>, it compiles just fine:</p>

<pre><code>func somefunc(r io.Reader){
}

func Test_FileReader(t *testing.T){
    f, err := os.Open("xyz")
    assert.NoError(t, err)

    somefunc(f)
}
</code></pre>

<p>Is it even possible to pass an *os.File as an *io.Reader??</p>
