summaryrefslogtreecommitdiff
path: root/src/lib/io.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-10-20 12:37:07 -0700
committerRuss Cox <rsc@golang.org>2008-10-20 12:37:07 -0700
commitab3a3f2e834b5b3a54246a032b6b25cc3d903fb4 (patch)
treef3a86526166a4e7adbee1efdd9b7d435f88263f5 /src/lib/io.go
parent0f3d573d0d6eca115d94d9768d608017b070d3fe (diff)
downloadgolang-ab3a3f2e834b5b3a54246a032b6b25cc3d903fb4.tar.gz
add io.ReadWriteClose and use it in http
R=r DELTA=15 (6 added, 7 deleted, 2 changed) OCL=17447 CL=17461
Diffstat (limited to 'src/lib/io.go')
-rw-r--r--src/lib/io.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/io.go b/src/lib/io.go
index 8ab751a02..20b7b9029 100644
--- a/src/lib/io.go
+++ b/src/lib/io.go
@@ -19,6 +19,12 @@ export type ReadWrite interface {
Write(p *[]byte) (n int, err *os.Error);
}
+export type ReadWriteClose interface {
+ Read(p *[]byte) (n int, err *os.Error);
+ Write(p *[]byte) (n int, err *os.Error);
+ Close() *os.Error;
+}
+
export func WriteString(w Write, s string) (n int, err *os.Error) {
b := new([]byte, len(s)+1);
if !syscall.StringToBytes(b, s) {