summaryrefslogtreecommitdiff
path: root/src/pkg/testing/iotest/writer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/testing/iotest/writer.go')
-rw-r--r--src/pkg/testing/iotest/writer.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/testing/iotest/writer.go b/src/pkg/testing/iotest/writer.go
index 54468a6fe..71f504ce2 100644
--- a/src/pkg/testing/iotest/writer.go
+++ b/src/pkg/testing/iotest/writer.go
@@ -5,8 +5,8 @@
package iotest
import (
- "io";
- "os";
+ "io"
+ "os"
)
// TruncateWriter returns a Writer that writes to w
@@ -16,8 +16,8 @@ func TruncateWriter(w io.Writer, n int64) io.Writer {
}
type truncateWriter struct {
- w io.Writer;
- n int64;
+ w io.Writer
+ n int64
}
func (t *truncateWriter) Write(p []byte) (n int, err os.Error) {
@@ -25,14 +25,14 @@ func (t *truncateWriter) Write(p []byte) (n int, err os.Error) {
return len(p), nil
}
// real write
- n = len(p);
+ n = len(p)
if int64(n) > t.n {
n = int(t.n)
}
- n, err = t.w.Write(p[0:n]);
- t.n -= int64(n);
+ n, err = t.w.Write(p[0:n])
+ t.n -= int64(n)
if err == nil {
n = len(p)
}
- return;
+ return
}