diff options
Diffstat (limited to 'vendor/cloud.google.com/go/internal/retry.go')
-rw-r--r-- | vendor/cloud.google.com/go/internal/retry.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/cloud.google.com/go/internal/retry.go b/vendor/cloud.google.com/go/internal/retry.go index f554fbf..e5ee25a 100644 --- a/vendor/cloud.google.com/go/internal/retry.go +++ b/vendor/cloud.google.com/go/internal/retry.go @@ -1,4 +1,4 @@ -// Copyright 2016 Google Inc. All Rights Reserved. +// Copyright 2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ package internal import ( - "fmt" "time" gax "github.com/googleapis/gax-go" @@ -48,7 +47,7 @@ func retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error), p := bo.Pause() if cerr := sleep(ctx, p); cerr != nil { if lastErr != nil { - return fmt.Errorf("%v; last function err: %v", cerr, lastErr) + return Annotatef(lastErr, "retry failed with %v; last error", cerr) } return cerr } |