@cryptotaxi247 / kubo / commits / 811457393

core/commands/pin: fix incorrect pointer type in encoder

Jorropo committed Jun 2, 2023 at 19:22 UTC 8114573933fe4cc9f494155bf8254848c0d414e5
1 file changed +3 -3
core/commands/pin/pin.go
+3 -3
@@ -365,14 +365,14 @@ Example:
365 }
366
367 if !stream {
368 - return cmds.EmitOnce(res, &PinLsOutputWrapper{
368 + return cmds.EmitOnce(res, PinLsOutputWrapper{
369 PinLsList: PinLsList{Keys: lgcList},
370 })
371 }
372
373 return nil
374 },
375 - Type: &PinLsOutputWrapper{},
375 + Type: PinLsOutputWrapper{},
376 Encoders: cmds.EncoderMap{
377 cmds.JSON: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out PinLsOutputWrapper) error {
378 stream, _ := req.Options[pinStreamOptionName].(bool)
@@ -421,7 +421,7 @@ type PinLsOutputWrapper struct {
421
422 // PinLsList is a set of pins with their type
423 type PinLsList struct {
424 - Keys map[string]PinLsType
424 + Keys map[string]PinLsType `json:",omitempty"`
425 }
426
427 // PinLsType contains the type of a pin