Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-16 06:00:07 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-16 06:00:07 +0300
commitdac5f9dc8a12671ccafc79c3d1681f6e6f131ed4 (patch)
treeea3eea9886fc58dd48b893ef576ed82075a6eaef /tools/module-updater
parent936640076881092ad60202823f2dc81828aa4b6d (diff)
lint: Fix discouraged error wrapping verb
We encourage wrapping error with %w when constructing a new error. The new error contains the original error so that it is able to be unwrapped later. This commit converts all error wrapping to %w.
Diffstat (limited to 'tools/module-updater')
-rw-r--r--tools/module-updater/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/module-updater/main.go b/tools/module-updater/main.go
index d8cfbda1e..608980d4c 100644
--- a/tools/module-updater/main.go
+++ b/tools/module-updater/main.go
@@ -65,15 +65,15 @@ func changeModuleVersion() error {
}
if err := rewriteImports(moduleAbsRootPath, prev, next); err != nil {
- return fmt.Errorf("re-write go imports: %s", err)
+ return fmt.Errorf("re-write go imports: %w", err)
}
if err := rewriteProto(moduleAbsRootPath, prev, next); err != nil {
- return fmt.Errorf("re-write .proto files: %s", err)
+ return fmt.Errorf("re-write .proto files: %w", err)
}
if err := rewriteGoMod(moduleAbsRootPath, next); err != nil {
- return fmt.Errorf("re-write go.mod file: %s", err)
+ return fmt.Errorf("re-write go.mod file: %w", err)
}
return nil