diff --git a/core/commands/pin.go b/core/commands/pin.go index 100c411bd480..5d350c98de36 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -39,8 +39,8 @@ var PinCmd = &cmds.Command{ } type PinOutput struct { - Pins []string - Error map[string]error `json:",omitempty"` + Pins []string + Errors map[string]error `json:",omitempty"` } type AddPinOutput struct { @@ -252,7 +252,7 @@ collected if needed. (By default, recursively. Use -r=false for direct pins.) Encoders: cmds.EncoderMap{ cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *PinOutput) error { for _, k := range out.Pins { - if err, ok := out.Error[k]; !ok { + if err, ok := out.Errors[k]; !ok { fmt.Fprintf(w, "unpinned %s\n", k) } else { fmt.Fprintf(os.Stderr, "cannot unpin %s: %s\n", k, err)