-
Notifications
You must be signed in to change notification settings - Fork 242
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
Split req and client #230
Split req and client #230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall very good! This seems like a very nice improvement, as we can configure and share the same client instance for multiple requests.
I have a question about ClientMode and few other suggestions that you can take with a grain of salt.
as this one is mainly used internally.
49dd117
to
a8c9a40
Compare
Thanks for reviewing @notnoop 🙏 !! Pong 🏓 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Thanks!
checksumFileURL, err := urlhelper.Parse(checksumFile) | ||
// ChecksumFromFile will only return checksums for files that match | ||
// checksummedURL, which is the object being checksummed. | ||
func (c *Client) ChecksumFromFile(ctx context.Context, checksumURL, checksummedURL string) (*FileChecksum, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, one more nitpick - now that we pass u.Path
, checksummedURL
should be checksummedPath
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't see this one sorry, you are correct. I will make a new PR changing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I pushed it directly to v2
🙂
This PR replaces #176.
This branch split request arguments from the client into a new request struct.
This is the groundwork to allow the go-getter to use file inplace or tell what operation happened.