Improve logging a bit

This commit is contained in:
ViViDboarder 2017-07-12 10:35:51 -07:00
parent 9b268fb293
commit 86d554f10a
2 changed files with 6 additions and 10 deletions

View File

@ -42,16 +42,12 @@ func parseFlags() (locale string, deliverables []string, silent bool) {
func getTOC(locale string, deliverable string) (toc *AtlasTOC, err error) { func getTOC(locale string, deliverable string) (toc *AtlasTOC, err error) {
var tocURL = fmt.Sprintf("https://developer.salesforce.com/docs/get_document/atlas.%s.%s.meta", locale, deliverable) var tocURL = fmt.Sprintf("https://developer.salesforce.com/docs/get_document/atlas.%s.%s.meta", locale, deliverable)
resp, err := http.Get(tocURL) resp, err := http.Get(tocURL)
if err != nil { ExitIfError(err)
return
}
// Read the downloaded JSON // Read the downloaded JSON
defer resp.Body.Close() defer resp.Body.Close()
contents, err := ioutil.ReadAll(resp.Body) contents, err := ioutil.ReadAll(resp.Body)
if err != nil { ExitIfError(err)
return
}
// Load into Struct // Load into Struct
toc = new(AtlasTOC) toc = new(AtlasTOC)