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

blob: document storing a ctx in blob.Writer #298

Merged
merged 2 commits into from
Aug 9, 2018

Conversation

shantuo
Copy link
Contributor

@shantuo shantuo commented Aug 9, 2018

Fixes #274

@shantuo shantuo requested a review from vangent August 9, 2018 18:11
@googlebot googlebot added the cla: yes Google CLA has been signed! label Aug 9, 2018
blob/blob.go Outdated
@@ -59,6 +59,12 @@ type Writer struct {

// These fields exist only when w is not created in the first place when
// NewWriter is called.
//
// A ctx is stored in the Writer since we need to pass it into NewTypedWriter
// when we finished detecting the content type of the object and create the
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: finished -> finish, "done passing it" -> "passed it".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -59,6 +59,12 @@ type Writer struct {

// These fields exist only when w is not created in the first place when
// NewWriter is called.
//
Copy link
Contributor

Choose a reason for hiding this comment

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

For the bug, I meant that we should document this in the public API. I.e., in NewWriter, which takes a ctx, we should document that the context must remain open until after the returned Writer is closed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack, added comment there.

Copy link
Contributor

@vangent vangent left a comment

Choose a reason for hiding this comment

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

LGTM

@vangent vangent merged commit 5fb966a into google:master Aug 9, 2018
@shantuo shantuo deleted the documentctx branch March 22, 2019 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA has been signed!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants