Skip to content

Commit

Permalink
fix: omit empty pins slice when reporting pin progress
Browse files Browse the repository at this point in the history
Otherwise, we get messages of the form `{Pins: null, Progress: 100}`.
After this change, we'll get `{Progress: 100}`.
  • Loading branch information
Stebalien committed Mar 25, 2021
1 parent 3f9c3f4 commit efa55e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/commands/pin/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ type PinOutput struct {
}

type AddPinOutput struct {
Pins []string
Progress int `json:",omitempty"`
Pins []string `json:",omitempty"`
Progress int `json:",omitempty"`
}

const (
Expand Down

0 comments on commit efa55e0

Please sign in to comment.