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

Side by Side Diff: common/retry/wrap.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor Created 3 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package retry
6
7 // wrap wraps a Factory, applying a modification function to each Iterator
8 // that it produces.
9 func wrap(g Factory, mod func(it Iterator) Iterator) Factory {
10 return func() Iterator {
11 next := g()
12 if next == nil {
13 return nil
14 }
15 return mod(next)
16 }
17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698