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 /tools/protoc-gen-gitaly-protolist
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 'tools/protoc-gen-gitaly-protolist')
-rw-r--r--tools/protoc-gen-gitaly-protolist/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/protoc-gen-gitaly-protolist/main.go b/tools/protoc-gen-gitaly-protolist/main.go
index c05facdae..223e555cd 100644
--- a/tools/protoc-gen-gitaly-protolist/main.go
+++ b/tools/protoc-gen-gitaly-protolist/main.go
@@ -87,7 +87,7 @@ func generateProtolistGo(req *pluginpb.CodeGeneratorRequest) error {
for _, fi := range files {
if !fi.IsDir() && strings.HasSuffix(fi.Name(), ".proto") {
- protoNames = append(protoNames, fmt.Sprintf(`"%s"`, fi.Name()))
+ protoNames = append(protoNames, fmt.Sprintf(`%q`, fi.Name()))
}
}