Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Unified Diff: vpython/venv/iterator.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vpython/venv/config.go ('k') | vpython/venv/prune.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/venv/iterator.go
diff --git a/vpython/venv/iterator.go b/vpython/venv/iterator.go
index b1c7ba290e9a5afceb51f26ef042a462bf18864e..5b97bff1f41f3d957a2399114f5e40ac7863254b 100644
--- a/vpython/venv/iterator.go
+++ b/vpython/venv/iterator.go
@@ -75,9 +75,7 @@ func iterDir(c context.Context, dirPath string, cb func([]os.FileInfo) error) er
// Get a listing of all VirtualEnv within the base directory.
dir, err := os.Open(dirPath)
if err != nil {
- return errors.Annotate(err).Reason("failed to open base directory: %(dir)s").
- D("dir", dirPath).
- Err()
+ return errors.Annotate(err, "failed to open base directory: %s", dirPath).Err()
}
defer dir.Close()
@@ -98,9 +96,7 @@ func iterDir(c context.Context, dirPath string, cb func([]os.FileInfo) error) er
done = true
default:
- return errors.Annotate(err).Reason("could not read directory contents: %(dir)s").
- D("dir", dirPath).
- Err()
+ return errors.Annotate(err, "could not read directory contents: %s", dirPath).Err()
}
if err := cb(fileInfos); err != nil {
« no previous file with comments | « vpython/venv/config.go ('k') | vpython/venv/prune.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698