From f25a3c6e0b4220c616a3b342b57b055c1256d318 Mon Sep 17 00:00:00 2001 From: Yash Ladha <18033231+yashLadha@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:09:50 +0530 Subject: [PATCH] fix: conflict import name with variable (#1879) `template` is an import in `cobra.go` file and also used as a variable name, which masks the library in the scope of that function. --- cobra.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra.go b/cobra.go index fe44bc8..841cda0 100644 --- a/cobra.go +++ b/cobra.go @@ -167,8 +167,8 @@ func appendIfNotPresent(s, stringToAppend string) string { // rpad adds padding to the right of a string. func rpad(s string, padding int) string { - template := fmt.Sprintf("%%-%ds", padding) - return fmt.Sprintf(template, s) + formattedString := fmt.Sprintf("%%-%ds", padding) + return fmt.Sprintf(formattedString, s) } // tmpl executes the given template text on data, writing the result to w.