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

eth: split api.go into namespace based files #27263

Merged
merged 7 commits into from
May 29, 2023

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented May 14, 2023

The current module has multiple API functions all in one file called api.go. It can be difficult for developers to find the implementation of a specific interface. To make it easier, consider splitting api.go into namespace-based file names.

@karalabe
Copy link
Member

I'm a bit torn here. One one hand I agree with the proposal (though I'd like the file names to be api_namecpase since otherwise the files will be littered all over the folder and I'll be wasting time searching the folder vs a file for the needed namespace). Thats said, since there are already so many files, it makes the package even more unwieldy.

@jsvisa
Copy link
Contributor Author

jsvisa commented May 16, 2023

Renamed the file names, please take another look :)

eth/api_debug_test.go Outdated Show resolved Hide resolved
@holiman
Copy link
Contributor

holiman commented May 25, 2023

I agree with the general change in this PR, but please do not modify anything when doing the split.

Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
This reverts commit b75a1298ffd3dc3c28d54ad6c62e4cca6e595af0.

Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman holiman added this to the 1.12.1 milestone May 29, 2023
@holiman holiman merged commit 1316621 into ethereum:master May 29, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
This change splits up the multiple API functions / namespaces currently defined in the eth package into different per-namespace files.
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
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.

4 participants