From 792ea41ef7f3715279ef73b612c00aada1c4acef Mon Sep 17 00:00:00 2001 From: Yash Ladha Date: Thu, 15 Dec 2022 08:55:57 +0530 Subject: [PATCH] fix: conflict import name with variable `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 fe44bc8a0..841cda0c8 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.