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

Commit 9bb5c62

Browse files
mattnsdboyer
authored andcommitted
should output [] if no packages to write
1 parent c694c4d commit 9bb5c62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/dep/status.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ type jsonOutput struct {
126126
missing []*MissingStatus
127127
}
128128

129-
func (out *jsonOutput) BasicHeader() {}
129+
func (out *jsonOutput) BasicHeader() {
130+
out.basic = []*BasicStatus{}
131+
}
130132

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

139141
func (out *jsonOutput) MissingHeader() {
142+
out.missing = []*MissingStatus{}
140143
}
141144

142145
func (out *jsonOutput) MissingLine(ms *MissingStatus) {

0 commit comments

Comments
 (0)