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
55b70d6c
Commit
55b70d6c
authored
May 15, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return error from WriteByte, to match bufio.Writer.
R=gri DELTA=4 (1 added, 0 deleted, 3 changed) OCL=28868 CL=28899
parent
0fe8487c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
bytebuffer.go
src/lib/io/bytebuffer.go
+4
-3
No files found.
src/lib/io/bytebuffer.go
View file @
55b70d6c
...
...
@@ -75,10 +75,11 @@ func (b *ByteBuffer) Write(p []byte) (n int, err os.Error) {
}
// WriteByte appends the byte c to the buffer.
//
Because Write never fails and WriteByte is not part of the
//
io.Writer interface, it does not need to return a valu
e.
func
(
b
*
ByteBuffer
)
WriteByte
(
c
byte
)
{
//
The returned error is always nil, but is included
//
to match bufio.Writer's WriteByt
e.
func
(
b
*
ByteBuffer
)
WriteByte
(
c
byte
)
os
.
Error
{
b
.
Write
([]
byte
{
c
});
return
nil
;
}
// Read reads the next len(p) bytes from the buffer or until the buffer
...
...
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