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

Add Inliner CID Builder. #4

Merged
merged 2 commits into from
Aug 21, 2018
Merged

Add Inliner CID Builder. #4

merged 2 commits into from
Aug 21, 2018

Conversation

kevina
Copy link
Contributor

@kevina kevina commented Aug 17, 2018

Will be used by ipfs/kubo#5281.

CC @Stebalien

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

I'd call this InlineBuilder or InliningBuilder to be a bit more descriptive but that's up to you.

This really is elegant.

inliner.go Outdated
// size of the content is no more than limit
type Inliner struct {
cid.Builder
Limit int
Copy link
Member

Choose a reason for hiding this comment

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

Should probably be documented (inclusive? exclusive?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean "Limit"? I said above "size of the content is no more than limit" which should imply inclusive.

Copy link
Member

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 that. Yes, that should be sufficient.

@Stebalien
Copy link
Member

I'm still not in love with the name but feel free to merge when ready. LGTM.

@kevina
Copy link
Contributor Author

kevina commented Aug 21, 2018

@Stebalien Changed the name to InlineBuilder.

Merging.

@kevina kevina merged commit 8aa9fde into master Aug 21, 2018
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