mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: doc, doc-inspired cleanup
R=r DELTA=368 (87 added, 14 deleted, 267 changed) OCL=25773 CL=25786
This commit is contained in:
parent
5bf0fbe7a8
commit
c93da7c70a
15 changed files with 340 additions and 267 deletions
|
|
@ -55,12 +55,12 @@ func (f *file) readLine() (s string, ok bool) {
|
|||
return
|
||||
}
|
||||
|
||||
func open(name string) *file {
|
||||
func open(name string) (*file, *os.Error) {
|
||||
fd, err := os.Open(name, os.O_RDONLY, 0);
|
||||
if err != nil {
|
||||
return nil
|
||||
return nil, err;
|
||||
}
|
||||
return &file{fd, make([]byte, 1024)[0:0]};
|
||||
return &file{fd, make([]byte, 1024)[0:0]}, nil;
|
||||
}
|
||||
|
||||
func byteIndex(s string, c byte) int {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue