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.
This commit is contained in:
Yash Ladha 2022-12-15 16:09:50 +05:30 committed by GitHub
parent 923592041e
commit f25a3c6e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,8 +167,8 @@ func appendIfNotPresent(s, stringToAppend string) string {
// rpad adds padding to the right of a string. // rpad adds padding to the right of a string.
func rpad(s string, padding int) string { func rpad(s string, padding int) string {
template := fmt.Sprintf("%%-%ds", padding) formattedString := fmt.Sprintf("%%-%ds", padding)
return fmt.Sprintf(template, s) return fmt.Sprintf(formattedString, s)
} }
// tmpl executes the given template text on data, writing the result to w. // tmpl executes the given template text on data, writing the result to w.