-
Notifications
You must be signed in to change notification settings - Fork 812
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
Conversation
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 |
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.
Nit: finished -> finish, "done passing it" -> "passed it".
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.
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. | |||
// |
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.
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.
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.
Ack, added comment there.
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
Fixes #274