Skip to content

fix: stop the sweep's logger shadowing the log import - #19

Merged
scotwells merged 1 commit into
mainfrom
fix/fabric-identity-sweep-log-shadow
Aug 27, 2026
Merged

fix: stop the sweep's logger shadowing the log import#19
scotwells merged 1 commit into
mainfrom
fix/fabric-identity-sweep-log-shadow

Conversation

@scotwells

Copy link
Copy Markdown
Collaborator

What is wrong

Lint is failing on main:

internal/controller/networkfabricidentity_controller.go:434:2:
  import-shadowing: The name 'log' shadows an import name (revive)

The logger I introduced in sweepLegacyPlacements is named log, and this file imports sigs.k8s.io/controller-runtime/pkg/log. Mine, from #18 — I ran the linter before that change and not after.

What changed

Renamed to logger. Nothing else.

Test plan

  • golangci-lint reports no import-shadowing
  • go build, go vet, full go test ./...

Lint fails on main: the local logger in sweepLegacyPlacements is named log,
which shadows the controller-runtime log package this file imports.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells requested a review from a team as a code owner August 27, 2026 22:05
@scotwells
scotwells requested a review from slindseysr August 27, 2026 22:05
@scotwells
scotwells merged commit 3e56b02 into main Aug 27, 2026
6 checks passed
@scotwells
scotwells deleted the fix/fabric-identity-sweep-log-shadow branch August 27, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants