mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
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:
parent
923592041e
commit
f25a3c6e0b
1 changed files with 2 additions and 2 deletions
4
cobra.go
4
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.
|
||||
|
|
Loading…
Reference in a new issue