mirror of
https://github.com/ViViDboarder/docset-sfdc.git
synced 2024-11-21 17:16:32 +00:00
Improve logging a bit
This commit is contained in:
parent
9b268fb293
commit
86d554f10a
@ -42,16 +42,12 @@ func parseFlags() (locale string, deliverables []string, silent bool) {
|
||||
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)
|
||||
resp, err := http.Get(tocURL)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
ExitIfError(err)
|
||||
|
||||
// Read the downloaded JSON
|
||||
defer resp.Body.Close()
|
||||
contents, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
ExitIfError(err)
|
||||
|
||||
// Load into Struct
|
||||
toc = new(AtlasTOC)
|
||||
|
Loading…
Reference in New Issue
Block a user