diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-02-18 09:50:58 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-02-18 09:53:27 +0100 |
commit | 91664defe0a75da15661a37a7f585b0c8523bf4e (patch) | |
tree | 8d7133037ce477c00ba0408d3f0892e0a8b5744d /src/pkg/io/io.go | |
parent | ac2d3c9eb73a2d23848c55c3171d8ff6dd0feed9 (diff) | |
download | golang-91664defe0a75da15661a37a7f585b0c8523bf4e.tar.gz |
Imported Upstream version 2011.02.15
Diffstat (limited to 'src/pkg/io/io.go')
-rw-r--r-- | src/pkg/io/io.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pkg/io/io.go b/src/pkg/io/io.go index 1a6eca95a..3b8791897 100644 --- a/src/pkg/io/io.go +++ b/src/pkg/io/io.go @@ -150,14 +150,23 @@ type WriterAt interface { WriteAt(p []byte, off int64) (n int, err os.Error) } -// ReadByter is the interface that wraps the ReadByte method. +// ByteReader is the interface that wraps the ReadByte method. // // ReadByte reads and returns the next byte from the input. // If no byte is available, err will be set. -type ReadByter interface { +type ByteReader interface { ReadByte() (c byte, err os.Error) } +// RuneReader is the interface that wraps the ReadRune method. +// +// ReadRune reads a single UTF-8 encoded Unicode character +// and returns the rune and its size in bytes. If no character is +// available, err will be set. +type RuneReader interface { + ReadRune() (rune int, size int, err os.Error) +} + // WriteString writes the contents of the string s to w, which accepts an array of bytes. func WriteString(w Writer, s string) (n int, err os.Error) { return w.Write([]byte(s)) |