Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(120)

Unified Diff: src/pkg/tabwriter/tabwriter.go

Issue 5294074: code review 5294074: src/pkg/[n-z]*: gofix -r error (Closed)
Patch Set: diff -r b78bb4f2d2a3 https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/syslog/syslog_unix.go ('k') | src/pkg/tabwriter/tabwriter_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/tabwriter/tabwriter.go
===================================================================
--- a/src/pkg/tabwriter/tabwriter.go
+++ b/src/pkg/tabwriter/tabwriter.go
@@ -215,7 +215,7 @@
// local error wrapper so we can distinguish os.Errors we want to return
// as errors from genuine panics (which we don't want to return as errors)
type osError struct {
- err os.Error
+ err error
}
func (b *Writer) write0(buf []byte) {
@@ -441,7 +441,7 @@
return len(*line)
}
-func handlePanic(err *os.Error) {
+func handlePanic(err *error) {
if e := recover(); e != nil {
*err = e.(osError).err // re-panics if it's not a local osError
}
@@ -452,7 +452,7 @@
// incomplete escape sequence at the end is simply considered
// complete for formatting purposes.
//
-func (b *Writer) Flush() (err os.Error) {
+func (b *Writer) Flush() (err error) {
defer b.reset() // even in the presence of errors
defer handlePanic(&err)
@@ -477,7 +477,7 @@
// The only errors returned are ones encountered
// while writing to the underlying output stream.
//
-func (b *Writer) Write(buf []byte) (n int, err os.Error) {
+func (b *Writer) Write(buf []byte) (n int, err error) {
defer handlePanic(&err)
// split text into cells
« no previous file with comments | « src/pkg/syslog/syslog_unix.go ('k') | src/pkg/tabwriter/tabwriter_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b