summaryrefslogtreecommitdiff
path: root/src/lib/io.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-10-07 12:31:31 -0700
committerRuss Cox <rsc@golang.org>2008-10-07 12:31:31 -0700
commit2e35ca6c33cd9c089b6536e9405e2f90a8ec101c (patch)
tree133422e9724c37fc7aac2fcf9f1c52b230af51ef /src/lib/io.go
parent5cff795078a27a56b69a1fa878b3b72be12b60a6 (diff)
downloadgolang-2e35ca6c33cd9c089b6536e9405e2f90a8ec101c.tar.gz
update code to follow new semicolon rules:
* 1. all statements and declarations are terminated by semicolons * 2. semicolons can be omitted at top level. * 3. semicolons can be omitted before and after the closing ) or } * on a list of statements or declarations. /home/rsc/bin/addsemi and then diff+tweak. R=r,gri OCL=16620 CL=16643
Diffstat (limited to 'src/lib/io.go')
-rw-r--r--src/lib/io.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/io.go b/src/lib/io.go
index 266d948fc..8ab751a02 100644
--- a/src/lib/io.go
+++ b/src/lib/io.go
@@ -20,11 +20,11 @@ export type ReadWrite interface {
}
export func WriteString(w Write, s string) (n int, err *os.Error) {
- b := new([]byte, len(s)+1)
+ b := new([]byte, len(s)+1);
if !syscall.StringToBytes(b, s) {
return -1, os.EINVAL
}
// BUG return w.Write(b[0:len(s)])
- r, e := w.Write(b[0:len(s)])
+ r, e := w.Write(b[0:len(s)]);
return r, e
}