Skip to content

Conversation

@ljluestc
Copy link

@ljluestc ljluestc commented Aug 3, 2025

What type of PR is this?

/kind bug
/kind cleanup
/kind feature

What this PR does / why we need it:

This PR fixes syntax errors in pkg/simple/client/k8s/client.go and related files that were causing go test ./... to fail with errors like "non-declaration statement outside function body" and "imports must appear before other declarations". The issues were due to misplaced imports, non-declaration statements outside functions, and unexpected keywords (e.g., 'package' inside functions).

  • Corrected import ordering and removed stray non-declaration statements.
  • Fixed misplaced 'package' keyword and ensured all declarations are properly placed.
  • Ensured compatibility with Go's syntax rules for declarations and imports.
  • Updated proxy implementation to integrate cleanly without syntax issues.

This is necessary to make the codebase compilable and testable, resolving build failures during development and CI.

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

  • Please review the changes in pkg/simple/client/k8s/client.go and run go test ./... to verify no syntax errors remain.
  • The fix maintains the original proxy feature logic while correcting syntax.
  • Tested with go vet ./pkg/... ./cmd/... and go test ./... – all pass now.

Does this PR introduced a user-facing change?

Fixed syntax errors in client.go and kubernetes.go, improving build stability. No user-facing changes.

@lordk911
Copy link

lordk911 commented Aug 5, 2025

#6550

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