From d712c2f1993fbb281519234213bc81dca90f35b9 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 23 Aug 2024 20:14:32 +0200 Subject: [PATCH] Use format arguments instead of concatenating strings That's what they are for. --- pkg/commands/git_config/cached_git_config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_config/cached_git_config.go b/pkg/commands/git_config/cached_git_config.go index da18d0866..539691e13 100644 --- a/pkg/commands/git_config/cached_git_config.go +++ b/pkg/commands/git_config/cached_git_config.go @@ -69,7 +69,7 @@ func (self *CachedGitConfig) getGeneralAux(args string) string { cmd := getGitConfigGeneralCmd(args) value, err := self.runGitConfigCmd(cmd) if err != nil { - self.log.Debugf("Error getting git config value for args: " + args + ". Error: " + err.Error()) + self.log.Debugf("Error getting git config value for args: %s. Error: %v", args, err.Error()) return "" } return strings.TrimSpace(value) @@ -79,7 +79,7 @@ func (self *CachedGitConfig) getAux(key string) string { cmd := getGitConfigCmd(key) value, err := self.runGitConfigCmd(cmd) if err != nil { - self.log.Debugf("Error getting git config value for key: " + key + ". Error: " + err.Error()) + self.log.Debugf("Error getting git config value for key: %s. Error: %v", key, err.Error()) return "" } return strings.TrimSpace(value)