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

chore: simple rename of cmd helper, ParseFromCtx to NewClientFromContext #2818

Closed
wants to merge 5 commits into from

Conversation

ramin
Copy link
Contributor

@ramin ramin commented Oct 6, 2023

discussed we'd do as a follow up after rpc merge yesterday with @vgonkivs, happy to wholeheartedly rejected here, but my feeling is

NewClientFromContext is a more idiomatic name for this than ParseClientFromCtx

…ntext is a more idiomatic name than ParseFromCtx
@ramin ramin self-assigned this Oct 6, 2023
@ramin ramin added the kind:refactor Attached to refactoring PRs label Oct 6, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2818 (5ee17e9) into main (0b5fc0b) will decrease coverage by 0.14%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2818      +/-   ##
==========================================
- Coverage   51.44%   51.30%   -0.14%     
==========================================
  Files         167      167              
  Lines       10752    10752              
==========================================
- Hits         5531     5516      -15     
- Misses       4742     4755      +13     
- Partials      479      481       +2     
Files Coverage Δ
cmd/rpc.go 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

@Wondertan
Copy link
Member

My concern here is that we don't instantiate the client, while New makes it seems like so. Get instead of New would be more appropriate, imo.

However, I do think that we should instantiate the Client in this func in future, rather than creating it elsewhere and passing through ctx, thus not opposed to keep the change.

@Wondertan Wondertan changed the title core: simple rename of cmd helper, ParseFromCtx to NewClientFromContext chore: simple rename of cmd helper, ParseFromCtx to NewClientFromContext Oct 6, 2023
@ramin
Copy link
Contributor Author

ramin commented Oct 8, 2023

@Wondertan oh man, i missed that is what was happening, I'm going to modify this so it really does take some of the flag stuff, set in context, and then instantiate the client, will be a little more "what you'd expect" then.

renaynay
renaynay previously approved these changes Nov 1, 2023
@renaynay
Copy link
Member

renaynay commented Nov 1, 2023

I'm fine with either way

@ramin ramin closed this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:refactor Attached to refactoring PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants