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

rewrite add command to use dagwriter #236

Merged
merged 2 commits into from
Oct 30, 2014
Merged

Conversation

jbenet
Copy link
Member

@jbenet jbenet commented Oct 30, 2014

moved a pinner into the dagwriter for inline pinning

@jbenet jbenet added the status/in-progress In progress label Oct 30, 2014
@@ -72,3 +75,41 @@ func NewDagFromFile(fpath string) (*dag.Node, error) {

return NewDagFromReader(f)
}

func NewDagFromFileWServer(fpath string, dserv dag.DAGService, p pin.Pinner) (*dag.Node, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

...WServer ? ...WithService ?

Since these are more complicated construction funcs, no need to adhere to the New... form. Could easily be named: ImportFileDag

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Ill give them nicer names now, lol

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, seems like you could just pass the DagWriter in directly. As in, maybe this function should just be taking a dagwriter.

dw, err := uio.NewDagWriter(dserv, chunk.DefaultSplitter)
if err != nil { ... }
nd, err := import.ImportFileDag(filename, dw) // arg lint error.

@jbenet
Copy link
Member Author

jbenet commented Oct 30, 2014

@whyrusleeping couple of interface comments, otherwise LGTM


const (
Recursive PinMode = iota
Direct
Copy link
Contributor

Choose a reason for hiding this comment

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

Strong, weak? (common vocabulary for this operation)

@whyrusleeping whyrusleeping merged commit 71ac117 into master Oct 30, 2014
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Oct 30, 2014
@jbenet
Copy link
Member Author

jbenet commented Oct 30, 2014

@whyrusleeping this failed tests. fixed in f0d823c

@jbenet jbenet deleted the dagwriter-addfix branch January 31, 2015 14:28
@Stebalien Stebalien mentioned this pull request Jun 14, 2017
15 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
Revert ipfs#236: Test go mod in travis and use major versioning in import paths
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
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.

3 participants