mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated. Step 2 will make os's error support internally much cleaner. R=rsc OCL=27586 CL=27586
This commit is contained in:
parent
3ea8d854a3
commit
aaf63f8d06
57 changed files with 341 additions and 339 deletions
|
|
@ -40,7 +40,7 @@ func (b *ByteBuffer) Reset() {
|
|||
|
||||
// Write appends the contents of p to the buffer. The return
|
||||
// value is the length of p; err is always nil.
|
||||
func (b *ByteBuffer) Write(p []byte) (n int, err *os.Error) {
|
||||
func (b *ByteBuffer) Write(p []byte) (n int, err os.Error) {
|
||||
plen := len(p);
|
||||
if len(b.buf) == 0 {
|
||||
b.cap = plen + 1024;
|
||||
|
|
@ -60,7 +60,7 @@ func (b *ByteBuffer) Write(p []byte) (n int, err *os.Error) {
|
|||
|
||||
// Read reads the next len(p) bytes from the buffer or until the buffer
|
||||
// is drained. The return value is the number of bytes read; err is always nil.
|
||||
func (b *ByteBuffer) Read(p []byte) (n int, err *os.Error) {
|
||||
func (b *ByteBuffer) Read(p []byte) (n int, err os.Error) {
|
||||
plen := len(p);
|
||||
if len(b.buf) == 0 {
|
||||
return 0, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue