Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
fce5d60b
Commit
fce5d60b
authored
Jan 07, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a standard interface that wraps ReadByte, io.ReadByter
R=rsc CC=golang-dev
https://golang.org/cl/181163
parent
4cde1a90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
io.go
src/pkg/io/io.go
+8
-0
No files found.
src/pkg/io/io.go
View file @
fce5d60b
...
...
@@ -150,6 +150,14 @@ type WriterAt interface {
WriteAt
(
p
[]
byte
,
off
int64
)
(
n
int
,
err
os
.
Error
)
}
// ReadByter 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
{
ReadByte
()
(
c
byte
,
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
(
strings
.
Bytes
(
s
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment