doc/codelab/wiki/index.html | 16 ++++++++-------- doc/codelab/wiki/wiki.html | 16 ++++++++-------- doc/debugging_with_gdb.html | 4 ++-- src/cmd/cgo/out.go | 2 +- src/cmd/goinstall/main.go | 2 +- src/cmd/govet/govet.go | 38 +++++++++++++++++++------------------- src/pkg/compress/bzip2/bit_reader.go | 2 +- src/pkg/crypto/rsa/rsa.go | 3 +-- src/pkg/crypto/tls/conn.go | 2 +- src/pkg/crypto/x509/verify.go | 2 +- src/pkg/exp/ssh/channel.go | 2 +- src/pkg/exp/types/gcimporter.go | 2 +- src/pkg/fmt/print.go | 2 +- src/pkg/go/ast/print.go | 2 +- src/pkg/go/printer/printer.go | 2 +- src/pkg/go/scanner/errors.go | 4 ++-- src/pkg/gob/error.go | 10 +++++----- src/pkg/old/netchan/import.go | 2 +- src/pkg/os/dir_plan9.go | 4 ++-- src/pkg/os/dir_unix.go | 2 +- src/pkg/os/file_unix.go | 2 +- src/pkg/os/file_windows.go | 2 +- src/pkg/regexp/all_test.go | 2 +- src/pkg/rpc/debug.go | 2 +- src/pkg/rpc/server.go | 25 ++++++++++++------------- src/pkg/runtime/error.go | 2 +- src/pkg/smtp/auth.go | 4 ++-- src/pkg/tabwriter/tabwriter.go | 2 +- src/pkg/template/doc.go | 4 ++-- src/pkg/template/exec.go | 2 +- src/pkg/template/exec_test.go | 2 +- src/pkg/template/funcs.go | 4 ++-- src/pkg/template/helper.go | 4 ++-- src/pkg/utf8/string.go | 20 ++++---------------- diff --git a/doc/codelab/wiki/index.html b/doc/codelab/wiki/index.html index 21248c18614184a4bdbc66a4c4c44163df8e37fb..3dafc5cbef36f6c0c07345937cf1f4b9121f9dea 100644 --- a/doc/codelab/wiki/index.html +++ b/doc/codelab/wiki/index.html @@ -107,7 +107,7 @@
This method's signature reads: "This is a method named save that
takes as its receiver p, a pointer to Page . It takes
-no parameters, and returns a value of type os.Error."
+no parameters, and returns a value of type error."
@@ -116,7 +116,7 @@ file. For simplicity, we will use the Title as the file name.
-The save method returns an os.Error value because
+The save method returns an error value because
that is the return type of WriteFile (a standard library function
that writes a byte slice to a file). The save method returns the
error value, to let the application handle it should anything go wrong while
@@ -152,7 +152,7 @@
Functions can return multiple values. The standard library function
-io.ReadFile returns []byte and os.Error.
+io.ReadFile returns []byte and error.
In loadPage, error isn't being handled yet; the "blank identifier"
represented by the underscore (_) symbol is used to throw away the
error return value (in essence, assigning the value to nothing).
@@ -161,7 +161,7 @@
But what happens if ReadFile encounters an error? For example,
the file might not exist. We should not ignore such errors. Let's modify the
-function to return *Page and os.Error.
+function to return *Page and error.
@@ -178,7 +178,7 @@Callers of this function can now check the second parameter; if it is
@@ -337,7 +337,7 @@ HTML, and writes it tonilthen it has successfully loaded a Page. If not, it will be an -os.Errorthat can be handled by the caller (see the error that can be handled by the caller (see the os package documentation for details).w, thehttp.ResponseWriter.-Again, note the use of
@@ -711,7 +711,7 @@_to ignore theos.Error+Again, note the use of_to ignore theerrorreturn value fromloadPage. This is done here for simplicity and generally considered bad practice. We will attend to this later.Then we create an
@@ -768,7 +768,7 @@ The functioninitfunction, which will be called beforemainat program initialization. The functiontemplate.Mustis a convenience wrapper that panics when passed a -non-nilos.Errorvalue, and otherwise returns the +non-nilerrorvalue, and otherwise returns the*Templateunaltered. A panic is appropriate here; if the templates can't be loaded the only sensible thing to do is exit the program.regexp.MustCompilewill parse and compile the regular expression, and return aregexp.Regexp.MustCompileis distinct fromCompilein that it will panic if the expression compilation fails, whileCompilereturns -anos.Erroras a second parameter. +anerroras a second parameter.diff --git a/doc/codelab/wiki/wiki.html b/doc/codelab/wiki/wiki.html index 634babd8b8f2988441756062131ed5192cd10dfe..c3dee3f709f9d1625d4b4096ceea473c55a7d42c 100644 --- a/doc/codelab/wiki/wiki.html +++ b/doc/codelab/wiki/wiki.html @@ -101,7 +101,7 @@
This method's signature reads: "This is a method named
savethat takes as its receiverp, a pointer toPage. It takes -no parameters, and returns a value of typeos.Error." +no parameters, and returns a value of typeerror."@@ -110,7 +110,7 @@ file. For simplicity, we will use the
Titleas the file name.-The
savemethod returns anos.Errorvalue because +Thesavemethod returns anerrorvalue because that is the return type ofWriteFile(a standard library function that writes a byte slice to a file). Thesavemethod returns the error value, to let the application handle it should anything go wrong while @@ -142,7 +142,7 @@Functions can return multiple values. The standard library function -
io.ReadFilereturns[]byteandos.Error. +io.ReadFilereturns[]byteanderror. InloadPage, error isn't being handled yet; the "blank identifier" represented by the underscore (_) symbol is used to throw away the error return value (in essence, assigning the value to nothing). @@ -151,7 +151,7 @@But what happens if
ReadFileencounters an error? For example, the file might not exist. We should not ignore such errors. Let's modify the -function to return*Pageandos.Error. +function to return*Pageanderror.@@ -161,7 +161,7 @@Callers of this function can now check the second parameter; if it is
@@ -297,7 +297,7 @@ HTML, and writes it tonilthen it has successfully loaded a Page. If not, it will be an -os.Errorthat can be handled by the caller (see the error that can be handled by the caller (see the os package documentation for details).w, thehttp.ResponseWriter.-Again, note the use of
@@ -575,7 +575,7 @@_to ignore theos.Error+Again, note the use of_to ignore theerrorreturn value fromloadPage. This is done here for simplicity and generally considered bad practice. We will attend to this later.Then we create an
@@ -622,7 +622,7 @@ The functioninitfunction, which will be called beforemainat program initialization. The functiontemplate.Mustis a convenience wrapper that panics when passed a -non-nilos.Errorvalue, and otherwise returns the +non-nilerrorvalue, and otherwise returns the*Templateunaltered. A panic is appropriate here; if the templates can't be loaded the only sensible thing to do is exit the program.regexp.MustCompilewill parse and compile the regular expression, and return aregexp.Regexp.MustCompileis distinct fromCompilein that it will panic if the expression compilation fails, whileCompilereturns -anos.Erroras a second parameter. +anerroras a second parameter.diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html index 04850c0266fbb33d054249e9d62dd8c6d2474195..874c468345f4d0a53393c77c6ebfab66e81c5d47 100644 --- a/doc/debugging_with_gdb.html +++ b/doc/debugging_with_gdb.html @@ -288,8 +288,8 @@ #0 0x000000000040facb in runtime.gosched () at /home/lvd/g/src/pkg/runtime/proc.c:873 #1 0x00000000004031c9 in runtime.chanrecv (c=void, ep=void, selected=void, received=void) at /home/lvd/g/src/pkg/runtime/chan.c:342 #2 0x0000000000403299 in runtime.chanrecv1 (t=void, c=void) at/home/lvd/g/src/pkg/runtime/chan.c:423 -#3 0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, os.Error *)} 0x7ffff7f9ef60, tests= []testing.InternalTest = {...}) at /home/lvd/g/src/pkg/testing/testing.go:201 -#4 0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, os.Error *)} 0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...}) +#3 0x000000000043075b in testing.RunTests (matchString={void (struct string, struct string, bool *, error *)} 0x7ffff7f9ef60, tests= []testing.InternalTest = {...}) at /home/lvd/g/src/pkg/testing/testing.go:201 +#4 0x00000000004302b1 in testing.Main (matchString={void (struct string, struct string, bool *, error *)} 0x7ffff7f9ef80, tests= []testing.InternalTest = {...}, benchmarks= []testing.InternalBenchmark = {...}) at /home/lvd/g/src/pkg/testing/testing.go:168 #5 0x0000000000400dc1 in main.main () at /home/lvd/g/src/pkg/regexp/_testmain.go:98 #6 0x00000000004022e7 in runtime.mainstart () at /home/lvd/g/src/pkg/runtime/amd64/asm.s:78 diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 25f4f3e663799bd1616af8f1ed1a781fa805bff7..86e4d3282d1ca89d8c68a9f257eadd8317b13166 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -276,7 +276,7 @@ /* nil interface */ v[0] = 0; v[1] = 0; } else { - ·_Cerrno(v, e); /* fill in v as os.Error for errno e */ + ·_Cerrno(v, e); /* fill in v as error for errno e */ } }`) } diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index 431a535f9b6c4ec4f74c5b2d1e47dd36c63f8e29..7414a250525553e579fccf6a4138b2a543ea0bdf 100644 --- a/src/cmd/goinstall/main.go +++ b/src/cmd/goinstall/main.go @@ -304,7 +304,7 @@ } // run runs the command cmd in directory dir with standard input stdin. // If the command fails, run prints the command and output on standard error -// in addition to returning a non-nil os.Error. +// in addition to returning a non-nil error. func run(dir string, stdin []byte, cmd ...string) error { return genRun(dir, stdin, cmd, false) } diff --git a/src/cmd/govet/govet.go b/src/cmd/govet/govet.go index 08b9845b3709abb60bfe6bc69b9a4f151aad48ba..e826f89d71ada7e5f01bb0deb63cea227b77413f 100644 --- a/src/cmd/govet/govet.go +++ b/src/cmd/govet/govet.go @@ -232,23 +232,23 @@ // method doesn't have a fmt.ScanState as its first argument, // we let it go. But if it does have a fmt.ScanState, then the // rest has to match. var canonicalMethods = map[string]MethodSig{ - // "Flush": {{}, {"os.Error"}}, // http.Flusher and jpeg.writer conflict - "Format": {[]string{"=fmt.State", "rune"}, []string{}}, // fmt.Formatter - "GobDecode": {[]string{"[]byte"}, []string{"os.Error"}}, // gob.GobDecoder - "GobEncode": {[]string{}, []string{"[]byte", "os.Error"}}, // gob.GobEncoder - "MarshalJSON": {[]string{}, []string{"[]byte", "os.Error"}}, // json.Marshaler - "MarshalXML": {[]string{}, []string{"[]byte", "os.Error"}}, // xml.Marshaler - "Peek": {[]string{"=int"}, []string{"[]byte", "os.Error"}}, // image.reader (matching bufio.Reader) - "ReadByte": {[]string{}, []string{"byte", "os.Error"}}, // io.ByteReader - "ReadFrom": {[]string{"=io.Reader"}, []string{"int64", "os.Error"}}, // io.ReaderFrom - "ReadRune": {[]string{}, []string{"rune", "int", "os.Error"}}, // io.RuneReader - "Scan": {[]string{"=fmt.ScanState", "rune"}, []string{"os.Error"}}, // fmt.Scanner - "Seek": {[]string{"=int64", "int"}, []string{"int64", "os.Error"}}, // io.Seeker - "UnmarshalJSON": {[]string{"[]byte"}, []string{"os.Error"}}, // json.Unmarshaler - "UnreadByte": {[]string{}, []string{"os.Error"}}, - "UnreadRune": {[]string{}, []string{"os.Error"}}, - "WriteByte": {[]string{"byte"}, []string{"os.Error"}}, // jpeg.writer (matching bufio.Writer) - "WriteTo": {[]string{"=io.Writer"}, []string{"int64", "os.Error"}}, // io.WriterTo + // "Flush": {{}, {"error"}}, // http.Flusher and jpeg.writer conflict + "Format": {[]string{"=fmt.State", "rune"}, []string{}}, // fmt.Formatter + "GobDecode": {[]string{"[]byte"}, []string{"error"}}, // gob.GobDecoder + "GobEncode": {[]string{}, []string{"[]byte", "error"}}, // gob.GobEncoder + "MarshalJSON": {[]string{}, []string{"[]byte", "error"}}, // json.Marshaler + "MarshalXML": {[]string{}, []string{"[]byte", "error"}}, // xml.Marshaler + "Peek": {[]string{"=int"}, []string{"[]byte", "error"}}, // image.reader (matching bufio.Reader) + "ReadByte": {[]string{}, []string{"byte", "error"}}, // io.ByteReader + "ReadFrom": {[]string{"=io.Reader"}, []string{"int64", "error"}}, // io.ReaderFrom + "ReadRune": {[]string{}, []string{"rune", "int", "error"}}, // io.RuneReader + "Scan": {[]string{"=fmt.ScanState", "rune"}, []string{"error"}}, // fmt.Scanner + "Seek": {[]string{"=int64", "int"}, []string{"int64", "error"}}, // io.Seeker + "UnmarshalJSON": {[]string{"[]byte"}, []string{"error"}}, // json.Unmarshaler + "UnreadByte": {[]string{}, []string{"error"}}, + "UnreadRune": {[]string{}, []string{"error"}}, + "WriteByte": {[]string{"byte"}, []string{"error"}}, // jpeg.writer (matching bufio.Writer) + "WriteTo": {[]string{"=io.Writer"}, []string{"int64", "error"}}, // io.WriterTo } func (f *File) checkMethod(id *ast.Ident, t *ast.FuncType) { @@ -560,11 +560,11 @@ type BadTypeUsedInTests struct { X int "hello" // ERROR "struct field tag" } -func (t *BadTypeUsedInTests) Scan(x fmt.ScanState, c byte) { // ERROR "method Scan[(]x fmt.ScanState, c byte[)] should have signature Scan[(]fmt.ScanState, rune[)] os.Error" +func (t *BadTypeUsedInTests) Scan(x fmt.ScanState, c byte) { // ERROR "method Scan[(]x fmt.ScanState, c byte[)] should have signature Scan[(]fmt.ScanState, rune[)] error" } type BadInterfaceUsedInTests interface { - ReadByte() byte // ERROR "method ReadByte[(][)] byte should have signature ReadByte[(][)] [(]byte, os.Error[)]" + ReadByte() byte // ERROR "method ReadByte[(][)] byte should have signature ReadByte[(][)] [(]byte, error[)]" } // printf is used by the test. diff --git a/src/pkg/compress/bzip2/bit_reader.go b/src/pkg/compress/bzip2/bit_reader.go index 390ee7c92658f9983a110b5b97ec69b6396757d7..d058c14833ba362631b0ca6db3020092bf5de0d3 100644 --- a/src/pkg/compress/bzip2/bit_reader.go +++ b/src/pkg/compress/bzip2/bit_reader.go @@ -10,7 +10,7 @@ "io" ) // bitReader wraps an io.Reader and provides the ability to read values, -// bit-by-bit, from it. Its Read* methods don't return the usual os.Error +// bit-by-bit, from it. Its Read* methods don't return the usual error // because the error handling was verbose. Instead, any error is kept and can // be checked afterwards. type bitReader struct { diff --git a/src/pkg/crypto/rsa/rsa.go b/src/pkg/crypto/rsa/rsa.go index d1b9577cd3dc724edafc373f3dae94bb4c530a11..c9344ffadffecf2ce22c77d648f425cccf5bd77f 100644 --- a/src/pkg/crypto/rsa/rsa.go +++ b/src/pkg/crypto/rsa/rsa.go @@ -55,8 +55,7 @@ R *big.Int // product of primes prior to this (inc p and q). } // Validate performs basic sanity checks on the key. -// It returns nil if the key is valid, or else an os.Error describing a problem. - +// It returns nil if the key is valid, or else an error describing a problem. func (priv *PrivateKey) Validate() error { // Check that the prime factors are actually prime. Note that this is // just a sanity check. Since the random witnesses chosen by diff --git a/src/pkg/crypto/tls/conn.go b/src/pkg/crypto/tls/conn.go index c0523370d61fa52edf9a7919849f93a4f77c9031..6312c34d6d75523b67ce28cd4697e4ba9240c7a6 100644 --- a/src/pkg/crypto/tls/conn.go +++ b/src/pkg/crypto/tls/conn.go @@ -828,7 +828,7 @@ return c.ocspResponse } // VerifyHostname checks that the peer certificate chain is valid for -// connecting to host. If so, it returns nil; if not, it returns an os.Error +// connecting to host. If so, it returns nil; if not, it returns an error // describing the problem. func (c *Conn) VerifyHostname(host string) error { c.handshakeMutex.Lock() diff --git a/src/pkg/crypto/x509/verify.go b/src/pkg/crypto/x509/verify.go index 49056cfa2dbb333c0c60c661ce74aa5d7f15d293..3021d20a67f154f5c03c34a48c64644fbdc97886 100644 --- a/src/pkg/crypto/x509/verify.go +++ b/src/pkg/crypto/x509/verify.go @@ -226,7 +226,7 @@ return true } // VerifyHostname returns nil if c is a valid certificate for the named host. -// Otherwise it returns an os.Error describing the mismatch. +// Otherwise it returns an error describing the mismatch. func (c *Certificate) VerifyHostname(h string) error { if len(c.DNSNames) > 0 { for _, match := range c.DNSNames { diff --git a/src/pkg/exp/ssh/channel.go b/src/pkg/exp/ssh/channel.go index 428e71c8069ada08abc9518ea9132b86aa298431..6ff8203ce27d6cb29f37c9317f60cd111407ca19 100644 --- a/src/pkg/exp/ssh/channel.go +++ b/src/pkg/exp/ssh/channel.go @@ -20,7 +20,7 @@ // other methods on the Channel may be called. If they are then the // peer is likely to signal a protocol error and drop the connection. Reject(reason RejectionReason, message string) error - // Read may return a ChannelRequest as an os.Error. + // Read may return a ChannelRequest as an error. Read(data []byte) (int, error) Write(data []byte) (int, error) Close() error diff --git a/src/pkg/exp/types/gcimporter.go b/src/pkg/exp/types/gcimporter.go index d88af9503111f92cd2dcabd6259c2fb1747be2b6..69dbd5ac5f34c2c766ef66f9f9808d3b82d4d7ae 100644 --- a/src/pkg/exp/types/gcimporter.go +++ b/src/pkg/exp/types/gcimporter.go @@ -188,7 +188,7 @@ func (p *gcParser) error(err interface{}) { if s, ok := err.(string); ok { err = errors.New(s) } - // panic with a runtime.Error if err is not an os.Error + // panic with a runtime.Error if err is not an error panic(importError{p.scanner.Pos(), err.(error)}) } diff --git a/src/pkg/fmt/print.go b/src/pkg/fmt/print.go index 8191ab3b4515c793522b61fd7e0acc5ef230edc7..13456445449b5850bb7c6c31d6a9b9d403860940 100644 --- a/src/pkg/fmt/print.go +++ b/src/pkg/fmt/print.go @@ -198,7 +198,7 @@ return s } // Errorf formats according to a format specifier and returns the string -// as a value that satisfies os.Error. +// as a value that satisfies error. func Errorf(format string, a ...interface{}) error { return errors.New(Sprintf(format, a...)) } diff --git a/src/pkg/go/ast/print.go b/src/pkg/go/ast/print.go index 70c9547e3cd910419a8353aece751606b71aa8cb..fb3068e1e937af928cb9e704b100acb46096f801 100644 --- a/src/pkg/go/ast/print.go +++ b/src/pkg/go/ast/print.go @@ -114,7 +114,7 @@ n += m return } -// localError wraps locally caught os.Errors so we can distinguish +// localError wraps locally caught errors so we can distinguish // them from genuine panics which we don't want to return as errors. type localError struct { err error diff --git a/src/pkg/go/printer/printer.go b/src/pkg/go/printer/printer.go index 2a1445dae3b74aae5dea8837953919d760ea1bf6..8f1ed1159dfb7a8ae2f580f1b5db977e9a828801 100644 --- a/src/pkg/go/printer/printer.go +++ b/src/pkg/go/printer/printer.go @@ -54,7 +54,7 @@ inLiteral pmode = 1 << iota noExtraLinebreak ) -// local error wrapper so we can distinguish os.Errors we want to return +// local error wrapper so we can distinguish errors we want to return // as errors from genuine panics (which we don't want to return as errors) type osError struct { err error diff --git a/src/pkg/go/scanner/errors.go b/src/pkg/go/scanner/errors.go index 7621cf55c160ca29d436d1dc279a04d735729eb8..cd9620b878b78f5814103399099df567655108ac 100644 --- a/src/pkg/go/scanner/errors.go +++ b/src/pkg/go/scanner/errors.go @@ -135,8 +135,8 @@ return list } -// GetError is like GetErrorList, but it returns an os.Error instead -// so that a nil result can be assigned to an os.Error variable and +// GetError is like GetErrorList, but it returns an error instead +// so that a nil result can be assigned to an error variable and // remains nil. // func (h *ErrorVector) GetError(mode int) error { diff --git a/src/pkg/gob/error.go b/src/pkg/gob/error.go index b0c40086d5263edd4be707535fb3535a3ca377b3..fbae8b683da74038a930e055219246e278b6ee88 100644 --- a/src/pkg/gob/error.go +++ b/src/pkg/gob/error.go @@ -9,16 +9,16 @@ // Errors in decoding and encoding are handled using panic and recover. // Panics caused by user error (that is, everything except run-time panics // such as "index out of bounds" errors) do not leave the file that caused -// them, but are instead turned into plain os.Error returns. Encoding and -// decoding functions and methods that do not return an os.Error either use +// them, but are instead turned into plain error returns. Encoding and +// decoding functions and methods that do not return an error either use // panic to report an error or are guaranteed error-free. -// A gobError wraps an os.Error and is used to distinguish errors (panics) generated in this package. +// A gobError is used to distinguish errors (panics) generated in this package. type gobError struct { err error } -// errorf is like error but takes Printf-style arguments to construct an os.Error. +// errorf is like error_ but takes Printf-style arguments to construct an error. // It always prefixes the message with "gob: ". func errorf(format string, args ...interface{}) { error_(fmt.Errorf("gob: "+format, args...)) @@ -30,7 +30,7 @@ panic(gobError{err}) } // catchError is meant to be used as a deferred function to turn a panic(gobError) into a -// plain os.Error. It overwrites the error return of the function that deferred its call. +// plain error. It overwrites the error return of the function that deferred its call. func catchError(err *error) { if e := recover(); e != nil { *err = e.(gobError).err // Will re-panic if not one of our errors, such as a runtime error. diff --git a/src/pkg/old/netchan/import.go b/src/pkg/old/netchan/import.go index 0c00e1574e01109d4eddca626087690c755b5f17..7243672ecd3cc3ec50d2ec85a05a14d8b557a897 100644 --- a/src/pkg/old/netchan/import.go +++ b/src/pkg/old/netchan/import.go @@ -186,7 +186,7 @@ // channel will have buffer space for size values, or 1 value if size < 1. // The channel to be bound to the remote site's channel is provided // in the call and may be of arbitrary channel type. // Despite the literal signature, the effective signature is -// ImportNValues(name string, chT chan T, dir Dir, size, n int) os.Error +// ImportNValues(name string, chT chan T, dir Dir, size, n int) error // Example usage: // imp, err := NewImporter("tcp", "netchanserver.mydomain.com:1234") // if err != nil { log.Fatal(err) } diff --git a/src/pkg/os/dir_plan9.go b/src/pkg/os/dir_plan9.go index abf98768d4c48ab829175af52dd2174681c128c1..263881e0c1c012f5ef41f31fb4907d1100547f65 100644 --- a/src/pkg/os/dir_plan9.go +++ b/src/pkg/os/dir_plan9.go @@ -22,7 +22,7 @@ // // If n <= 0, Readdir returns all the FileInfo from the directory in // a single slice. In this case, if Readdir succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdir returns the FileInfo read until that point // and a non-nil error. func (file *File) Readdir(n int) (fi []FileInfo, err error) { @@ -87,7 +87,7 @@ // // If n <= 0, Readdirnames returns all the names from the directory in // a single slice. In this case, if Readdirnames succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdirnames returns the names read until that point and // a non-nil error. func (file *File) Readdirnames(n int) (names []string, err error) { diff --git a/src/pkg/os/dir_unix.go b/src/pkg/os/dir_unix.go index df89a0e82e480c820e4a3e3e6fd01df3ead5f771..e59c1af2ea758c4cdd353455202b07a35c83a6c0 100644 --- a/src/pkg/os/dir_unix.go +++ b/src/pkg/os/dir_unix.go @@ -24,7 +24,7 @@ // // If n <= 0, Readdirnames returns all the names from the directory in // a single slice. In this case, if Readdirnames succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdirnames returns the names read until that point and // a non-nil error. func (f *File) Readdirnames(n int) (names []string, err error) { diff --git a/src/pkg/os/file_unix.go b/src/pkg/os/file_unix.go index dc8e6f003451d918f5e091b9956cfc2f0419db8f..f4038168fcc199be0bdb0840cf98f0604d91aa7f 100644 --- a/src/pkg/os/file_unix.go +++ b/src/pkg/os/file_unix.go @@ -141,7 +141,7 @@ // // If n <= 0, Readdir returns all the FileInfo from the directory in // a single slice. In this case, if Readdir succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdir returns the FileInfo read until that point // and a non-nil error. func (file *File) Readdir(n int) (fi []FileInfo, err error) { diff --git a/src/pkg/os/file_windows.go b/src/pkg/os/file_windows.go index 96cadce4d8c835ef45d092e555c831301689f618..a8c36cb1bc55c31bf4cc63254fc05cfc04c89966 100644 --- a/src/pkg/os/file_windows.go +++ b/src/pkg/os/file_windows.go @@ -131,7 +131,7 @@ // // If n <= 0, Readdir returns all the FileInfo from the directory in // a single slice. In this case, if Readdir succeeds (reads all // the way to the end of the directory), it returns the slice and a -// nil os.Error. If it encounters an error before the end of the +// nil error. If it encounters an error before the end of the // directory, Readdir returns the FileInfo read until that point // and a non-nil error. func (file *File) Readdir(n int) (fi []FileInfo, err error) { diff --git a/src/pkg/regexp/all_test.go b/src/pkg/regexp/all_test.go index c707b119bde226811daea6762d565140a07d7002..8810796daf2d4176dad4e665d5a7044aa06cc94d 100644 --- a/src/pkg/regexp/all_test.go +++ b/src/pkg/regexp/all_test.go @@ -32,7 +32,7 @@ /* type stringError struct { re string - err os.Error + err error } var bad_re = []stringError{ diff --git a/src/pkg/rpc/debug.go b/src/pkg/rpc/debug.go index f29ea8dba00059613c247873c028c9607df9e14d..02d577f6779a2126cfcccd1d3549c787cd696941 100644 --- a/src/pkg/rpc/debug.go +++ b/src/pkg/rpc/debug.go @@ -27,7 +27,7 @@
| Method | Calls | {{range .Method}}|
|---|---|---|
| {{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) os.Error | +{{.Name}}({{.Type.ArgType}}, {{.Type.ReplyType}}) error | {{.Type.NumCalls}} |