Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
should output [] if no packages to write
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn authored and sdboyer committed Feb 6, 2017
1 parent c694c4d commit 9bb5c62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/dep/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ type jsonOutput struct {
missing []*MissingStatus
}

func (out *jsonOutput) BasicHeader() {}
func (out *jsonOutput) BasicHeader() {
out.basic = []*BasicStatus{}
}

func (out *jsonOutput) BasicFooter() {
json.NewEncoder(out.w).Encode(out.basic)
Expand All @@ -137,6 +139,7 @@ func (out *jsonOutput) BasicLine(bs *BasicStatus) {
}

func (out *jsonOutput) MissingHeader() {
out.missing = []*MissingStatus{}
}

func (out *jsonOutput) MissingLine(ms *MissingStatus) {
Expand Down

0 comments on commit 9bb5c62

Please sign in to comment.