Skip to content

Conversation

patrickdappollonio
Copy link
Owner

A well deserved spring cleaning on this project.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

A broad spring cleaning refactoring with extensive renaming, reorganizing, and migration of error reporting and helper functions across the codebase.

  • Refactored error types and updated their usage with improved naming and package structure.
  • Updated sorting, metadata, file I/O, and template rendering code, ensuring consistent exported field naming and cleanup of legacy code.
  • Adjusted import paths and switched to new APIs (e.g. usage of slices.Contains) to align with updated coding practices.

Reviewed Changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
slice/execute.go Imported new error types and updated variable references to exported fields.
slice/errors_test.go, errors.go Removed legacy error types; now using package errors with clearer error messages.
pkg/template/* Added and updated template rendering and test functions.
pkg/kubernetes/* Consolidated sorting, metadata extraction, and validation logic.
pkg/files/* Updated file handling to use generic slices.Contains and renamed functions.
app.go Updated flag defaults to use the new template package constants.
Comments suppressed due to low confidence (1)

pkg/kubernetes/sorting.go:70

  • [nitpick] In the lessByKind function, when both kinds are unknown and equal, the branch returns 'first < second' (with both values defaulting to 0), which is effectively false. For clarity and expressiveness, consider replacing 'return first < second' with an explicit 'return false' to clearly indicate that equal unknown kinds should maintain their order.
if !aok && !bok {

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.

1 participant