Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: removes debug/macho and GetFile #103

Merged
merged 3 commits into from
Oct 20, 2024

Conversation

Zxilly
Copy link
Contributor

@Zxilly Zxilly commented Oct 16, 2024

Closes: #101
Closes: #102

@Zxilly Zxilly changed the title refactor: removes debug/macho refactor: removes debug/macho and GetFile Oct 16, 2024
@Zxilly
Copy link
Contributor Author

Zxilly commented Oct 18, 2024

@TcM1911 Can you take a look at this patch?
By the way, I would like to join the goretk organization to better maintain this project.

Copy link
Member

@TcM1911 TcM1911 left a comment

Choose a reason for hiding this comment

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

It all looks good. The only thing I have a question about is the decision to remove a public method.

@@ -181,16 +184,16 @@ func (f *GoFile) initPackages() error {
return f.initPackagesError
}

// GetFile returns the raw file opened by the library.
func (f *GoFile) GetFile() *os.File {
Copy link
Member

Choose a reason for hiding this comment

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

This is removing an exported method which likely will break some stuff downstream. I know it's not a 1.0 version yet so breakage is not guaranteed but I like to avoid it as much as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we didn't hold a *os.File right now, there's no way to keep providing this API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/search?q=lang%3AGo+github.com%2Fgoretk%2Fgore&type=code

Additionally, I performed a search in GitHub and no repositories seem to be calling this API except for my project https://github.com/Zxilly/go-size-analyzer.

@Zxilly Zxilly requested a review from TcM1911 October 18, 2024 18:14
@TcM1911 TcM1911 merged commit 0468b2c into goretk:develop Oct 20, 2024
3 checks passed
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.

Remove GetFile, add io.ReaderAt API Remove debug/macho
2 participants