]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go_tutorial: make clear the file example is Unix-specific
authorRob Pike <r@golang.org>
Mon, 12 Dec 2011 05:03:49 +0000 (21:03 -0800)
committerRob Pike <r@golang.org>
Mon, 12 Dec 2011 05:03:49 +0000 (21:03 -0800)
Fixes #2553.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5472074

doc/go_tutorial.html
doc/go_tutorial.tmpl

index 145ea211066058cc0058ce5d62d48169b53b9663..f7e4e7b821b146caa245df9dc5296558058ba46c 100644 (file)
@@ -481,8 +481,9 @@ assigned to a variable.
 <p>
 <h2>An I/O Package</h2>
 <p>
-Next we'll look at a simple package for doing file I/O with an
-open/close/read/write interface.  Here's the start of <code>file.go</code>:
+Next we'll look at a simple package for doing Unix file I/O with an
+open/close/read/write interface.
+Here's the start of <code>file.go</code>:
 <p>
 <pre><!--{{code "progs/file.go" `/package/` `/^}/`}}
 -->package file
@@ -507,6 +508,11 @@ and reproduce the rudiments of its file I/O.
 <p>
 The other item is the low-level, external <code>syscall</code> package, which provides
 a primitive interface to the underlying operating system's calls.
+The <code>syscall</code> package is very system-dependent, and the way it's
+used here works only on Unix-like systems,
+but the general ideas explored here apply broadly.
+(A Windows version is available in
+<a href="progs/file_windows.go"><code>file_windows.go</code></a>.)
 <p>
 Next is a type definition: the <code>type</code> keyword introduces a type declaration,
 in this case a data structure called <code>File</code>.
index 2a583e2f494a8f6ca9e0e565e602e7a4ede421bd..b07a1984041c73c0a22f18622ed3e0f8fa11e343 100644 (file)
@@ -422,8 +422,9 @@ assigned to a variable.
 <p>
 <h2>An I/O Package</h2>
 <p>
-Next we'll look at a simple package for doing file I/O with an
-open/close/read/write interface.  Here's the start of <code>file.go</code>:
+Next we'll look at a simple package for doing Unix file I/O with an
+open/close/read/write interface.
+Here's the start of <code>file.go</code>:
 <p>
 {{code "progs/file.go" `/package/` `/^}/`}}
 <p>
@@ -436,6 +437,11 @@ and reproduce the rudiments of its file I/O.
 <p>
 The other item is the low-level, external <code>syscall</code> package, which provides
 a primitive interface to the underlying operating system's calls.
+The <code>syscall</code> package is very system-dependent, and the way it's
+used here works only on Unix-like systems,
+but the general ideas explored here apply broadly.
+(A Windows version is available in
+<a href="progs/file_windows.go"><code>file_windows.go</code></a>.)
 <p>
 Next is a type definition: the <code>type</code> keyword introduces a type declaration,
 in this case a data structure called <code>File</code>.