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
121b428a
Commit
121b428a
authored
May 08, 2011
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
effective go: update to new Open signature.
Fixes #1788. R=rsc, adg CC=golang-dev
https://golang.org/cl/4519042
parent
8bf15158
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
effective_go.html
doc/effective_go.html
+4
-4
No files found.
doc/effective_go.html
View file @
121b428a
...
...
@@ -504,7 +504,7 @@ the body ends in <code>break</code>, <code>continue</code>,
</p>
<pre>
f, err := os.Open(name
, os.O_RDONLY, 0
)
f, err := os.Open(name)
if err != nil {
return err
}
...
...
@@ -520,7 +520,7 @@ statements, the resulting code needs no <code>else</code> statements.
</p>
<pre>
f, err := os.Open(name
, os.O_RDONLY, 0
)
f, err := os.Open(name)
if err != nil {
return err
}
...
...
@@ -813,7 +813,7 @@ canonical examples are unlocking a mutex or closing a file.
<pre>
// Contents returns the file's contents as a string.
func Contents(filename string) (string, os.Error) {
f, err := os.Open(filename
, os.O_RDONLY, 0
)
f, err := os.Open(filename)
if err != nil {
return "", err
}
...
...
@@ -2675,7 +2675,7 @@ field for recoverable failures.
<pre>
for try := 0; try
<
2; try++ {
file, err = os.Open(filename
, os.O_RDONLY, 0
)
file, err = os.Open(filename)
if err == nil {
return
}
...
...
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