Skip to content

Commit 47117c8

Browse files
Handle err case in consumer.go
1 parent 0c3f979 commit 47117c8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

json-diff/consumer.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ func consumer(rc chan RequestData, wg *sync.WaitGroup) {
1414

1515
liveResponse, err := callAPI(request.Endpoints.Live, request.RequestParams)
1616
if err != nil {
17-
writeJSONStringToFile("./live/"+someUniqueFileName, liveResponse)
17+
fmt.Println("[error]: ", err)
1818
}
19+
writeJSONStringToFile("./live/"+someUniqueFileName, liveResponse)
1920
localResponse, err := callAPI(request.Endpoints.Local, request.RequestParams)
2021
if err != nil {
21-
writeJSONStringToFile("./local/"+someUniqueFileName, localResponse)
22+
fmt.Println("[error]: ", err)
2223
}
23-
24+
writeJSONStringToFile("./local/"+someUniqueFileName, localResponse)
25+
2426
wg.Done()
2527
}
2628
}

0 commit comments

Comments
 (0)