From: Rob Pike Date: Mon, 12 Dec 2011 05:03:49 +0000 (-0800) Subject: doc/go_tutorial: make clear the file example is Unix-specific X-Git-Tag: weekly.2011-12-14~99 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b78a7b7dabd367722affa7188adb26d503b39109;p=gostls13.git 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 --- 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.

An I/O Package

-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 file.go: +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 file.go:

package file
@@ -507,6 +508,11 @@ and reproduce the rudiments of its file I/O.
 

The other item is the low-level, external syscall package, which provides a primitive interface to the underlying operating system's calls. +The syscall 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 +file_windows.go.)

Next is a type definition: the type keyword introduces a type declaration, in this case a data structure called File. diff --git a/doc/go_tutorial.tmpl b/doc/go_tutorial.tmpl index 2a583e2f49..b07a198404 100644 --- a/doc/go_tutorial.tmpl +++ b/doc/go_tutorial.tmpl @@ -422,8 +422,9 @@ assigned to a variable.

An I/O Package

-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 file.go: +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 file.go:

{{code "progs/file.go" `/package/` `/^}/`}}

@@ -436,6 +437,11 @@ and reproduce the rudiments of its file I/O.

The other item is the low-level, external syscall package, which provides a primitive interface to the underlying operating system's calls. +The syscall 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 +file_windows.go.)

Next is a type definition: the type keyword introduces a type declaration, in this case a data structure called File.