@cryptotaxi247 / kubo / commits / fceb55ef1

object put: Added plaintext marshaler

Matt Bell committed Nov 14, 2014 at 00:07 UTC fceb55ef1ea0e6fb3c56d4406ab8047727d0b3b6
1 file changed +6
core/commands2/object.go
+6
@@ -221,6 +221,12 @@ Data should be in the format specified by <encoding>.
221
222 return output, nil
223 },
224 + Marshalers: cmds.MarshalerMap{
225 + cmds.Text: func(res cmds.Response) ([]byte, error) {
226 + object := res.Output().(*Object)
227 + return []byte(object.Hash), nil
228 + },
229 + },
230 Type: &Object{},
231 }
232