This commit is contained in:
Mark McGranaghan 2014-05-11 17:17:46 -07:00
parent 6e48a2324e
commit edf813b3d1
3 changed files with 5 additions and 4 deletions

View File

@ -33,7 +33,7 @@ func main() {
// by `Open`ing a file to obtain an `os.File` value.
f, err := os.Open("/tmp/dat")
check(err)
// Read some bytes from the beginning of the file.
// Allow up to 5 to be read but also note how many
// actually were read.

View File

@ -1,2 +1,2 @@
251ab050de24051bb7d9858940421fdec41fa674
VcLqpSwnkN
2aa7a2e248065cebfa6f8eece3234b5ffa710273
2kEKXq-kUV

View File

@ -41,7 +41,7 @@ reading files.</p>
</td>
<td class="code leading">
<a href="http://play.golang.org/p/VcLqpSwnkN"><img title="Run code" src="play.png" class="run" /></a>
<a href="http://play.golang.org/p/2kEKXq-kUV"><img title="Run code" src="play.png" class="run" /></a>
<div class="highlight"><pre><span class="kn">package</span> <span class="nx">main</span>
</pre></div>
@ -122,6 +122,7 @@ by <code>Open</code>ing a file to obtain an <code>os.File</code> value.</p>
<td class="code leading">
<div class="highlight"><pre> <span class="nx">f</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">os</span><span class="p">.</span><span class="nx">Open</span><span class="p">(</span><span class="s">&quot;/tmp/dat&quot;</span><span class="p">)</span>
<span class="nx">check</span><span class="p">(</span><span class="nx">err</span><span class="p">)</span>
</pre></div>
</td>