Skip to content

Commit

Permalink
object put: wrap CID in Object
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
  • Loading branch information
magik6k committed Jul 31, 2017
1 parent c9446a7 commit 0842a40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/commands/object/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ And then run:
}
}

res.SetOutput(objectCid)
res.SetOutput(Object{Hash: objectCid.String()})
},
Marshalers: cmds.MarshalerMap{
cmds.Text: func(res cmds.Response) (io.Reader, error) {
object := res.Output().(*cid.Cid)
return strings.NewReader("added " + object.String() + "\n"), nil
object := res.Output().(*Object)
return strings.NewReader("added " + object.Hash + "\n"), nil
},
},
Type: cid.Cid{},
Type: Object{},
}

var ObjectNewCmd = &cmds.Command{
Expand Down

0 comments on commit 0842a40

Please sign in to comment.