Skip to content

Conversation

wlan0
Copy link
Contributor

@wlan0 wlan0 commented Jul 23, 2025

This PR adds support for local build output by implementing a new parseOutput function that handles CSV output strings and supports the local export type.

Changes

  • Added parseOutput and parseOutputCSV functions to handle output parsing
    • Modified Build function to handle local export type with proper directory setup
    • Added comprehensive test coverage for the new parsing functionality
    • Supports oci, tar, and local output types

Testing

  • Added unit tests covering various output scenarios including edge cases
    • All existing functionality remains unchanged

@wlan0 wlan0 requested a review from katiewasnothere July 23, 2025 16:31
Comment on lines 343 to 355
// contains checks if a string contains a substring
func contains(s, substr string) bool {
return len(s) >= len(substr) && (s == substr || len(s) > len(substr) && (s[:len(substr)] == substr || s[len(s)-len(substr):] == substr || len(substr) > 0 && len(s) > len(substr) && findSubstring(s, substr)))
}

func findSubstring(s, substr string) bool {
for i := 0; i <= len(s)-len(substr); i++ {
if s[i:i+len(substr)] == substr {
return true
}
}
return false
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the string package's contains function instead?

@wlan0 wlan0 force-pushed the local-build-output branch from c0ca3b9 to 1554fbe Compare July 23, 2025 19:02
@wlan0 wlan0 force-pushed the local-build-output branch from 1554fbe to 8ffc5b4 Compare July 23, 2025 19:27
@wlan0 wlan0 merged commit 586ff53 into main Jul 23, 2025
2 checks passed
@wlan0 wlan0 deleted the local-build-output branch July 23, 2025 19:38
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