aboutsummaryrefslogtreecommitdiff
path: root/doc/go_tutorial.html
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-12-11 21:03:49 -0800
committerRob Pike <r@golang.org>2011-12-11 21:03:49 -0800
commitb78a7b7dabd367722affa7188adb26d503b39109 (patch)
tree8846481b7264cfe26ac4eb67d44871f1356645aa /doc/go_tutorial.html
parent0c5443a0a61182276f755c1c728d4990cf0983e9 (diff)
downloadgo-b78a7b7dabd367722affa7188adb26d503b39109.tar.xz
doc/go_tutorial: make clear the file example is Unix-specific
Fixes #2553. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5472074
Diffstat (limited to 'doc/go_tutorial.html')
-rw-r--r--doc/go_tutorial.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/go_tutorial.html b/doc/go_tutorial.html
index 145ea21106..f7e4e7b821 100644
--- a/doc/go_tutorial.html
+++ b/doc/go_tutorial.html
@@ -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>.