Skip to content

Commit 0c211d5

Browse files
committed
fix: avoid variable shadowing by renaming loop variable 'plugin'
The loop variable 'plugin' was shadowing the imported 'plugin' package from sigs.k8s.io/kubebuilder. Renamed it to 'plg' to improve clarity and prevent potential confusion or unintended behavior.
1 parent 06c0575 commit 0c211d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/cli/alpha/internal/generate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ func getInitArgs(store store.Store) []string {
265265
}
266266

267267
// Replace outdated plugins and exit after the first replacement
268-
for i, plugin := range plugins {
269-
if newPlugin, exists := outdatedPlugins[plugin]; exists {
268+
for i, plg := range plugins {
269+
if newPlugin, exists := outdatedPlugins[plg]; exists {
270270
log.Warnf("We checked that your PROJECT file is configured with the layout '%s', which is no longer supported.\n"+
271-
"However, we will try our best to re-generate the project using '%s'.", plugin, newPlugin)
271+
"However, we will try our best to re-generate the project using '%s'.", plg, newPlugin)
272272
plugins[i] = newPlugin
273273
break
274274
}

0 commit comments

Comments
 (0)