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-14 13:40:15 +0300
committerQuang-Minh Nguyen <qmnguyen@gitlab.com>2023-03-16 05:50:46 +0300
commit936640076881092ad60202823f2dc81828aa4b6d (patch)
treeaa79a72dd5362f5185f5b55e8265d7106a9625a6 /internal/git2go
parent5c42c9509ff0fab716f7b903b9dc4be77f1c15d9 (diff)
lint: Fix manual quote interpolation offenses
This commit fixes manually quoted string interpolation with '%s' and "%s". Quoting this way doesn't escape special characters such as endline and makes debugging harder later. We encourage to use %q verb instead.
Diffstat (limited to 'internal/git2go')
-rw-r--r--internal/git2go/commit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git2go/commit.go b/internal/git2go/commit.go
index 115c354e2..fd14b6d45 100644
--- a/internal/git2go/commit.go
+++ b/internal/git2go/commit.go
@@ -55,7 +55,7 @@ func (err IndexError) Error() string {
case ErrFileNotFound:
return "A file with this name doesn't exist"
case ErrInvalidPath:
- return fmt.Sprintf("invalid path: '%s'", err.Path)
+ return fmt.Sprintf("invalid path: %q", err.Path)
default:
panic(fmt.Sprintf("unhandled IndexErrorType: %v", err.Type))
}