Skip to content

Conversation

@qining
Copy link
Contributor

@qining qining commented Sep 7, 2018

This is another approach to do the same thing as #2179

@qining qining changed the title Another to drop raw bytes of the capture data Another way to drop raw bytes of the capture data Sep 7, 2018
@qining
Copy link
Contributor Author

qining commented Sep 13, 2018

@ben-clayton Any suggestions about this CL?

Copy link
Contributor

@ben-clayton ben-clayton left a comment

Choose a reason for hiding this comment

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

Sorry for the slow review.
I like this solution. Good stuff!
Please can you squash the top two CLs? Having the intermediate form appears to serve no purpose and just litters the git history.

return e.encode(ctx)
}

type Source interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs please.

bytes.Reader
}

func (brc *blobReadCloser) Close() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Übernit: You can drop the brc * bit of the receiver.

}

func (b *Blob) ReadCloser() (io.ReadCloser, error) {
return &blobReadCloser{*bytes.NewReader(b.GetData())}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Übernit: Make bytes.Reader field a pointer (*bytes.Reader), you can drop the indirection stuff:

return blobReadCloser{bytes.NewReader(b.GetData())}, nil

@qining qining force-pushed the another-way-do-not-cache-capture-data branch from e65364b to 41cb2b7 Compare September 18, 2018 17:39
@qining
Copy link
Contributor Author

qining commented Sep 18, 2018

Yep, I always squash and rebase for CLs.

@qining qining merged commit 5bf4a56 into google:master Sep 18, 2018
ben-clayton added a commit to ben-clayton/gapid that referenced this pull request Sep 19, 2018
ben-clayton added a commit that referenced this pull request Sep 19, 2018
@qining qining deleted the another-way-do-not-cache-capture-data branch October 23, 2018 17:26
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.

2 participants