Add a header and trailing new line to downloads
Header allows the reader to know where the additions came from and the new line makes sure that 2 entries down get jumbled togetherstable
parent
6529fe49fd
commit
1f9d3faa8b
|
|
@ -180,6 +180,10 @@ func downloadcontent(downloads []string, tmpdir string) {
|
||||||
|
|
||||||
for _, d := range downloads {
|
for _, d := range downloads {
|
||||||
log.Print("Downloading: ",d)
|
log.Print("Downloading: ",d)
|
||||||
|
file.WriteString("# rhosts download - " + d + "\n")
|
||||||
|
if (err != nil) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
response, err := http.Get(d)
|
response, err := http.Get(d)
|
||||||
if (err !=nil) {
|
if (err !=nil) {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
|
|
@ -190,5 +194,9 @@ func downloadcontent(downloads []string, tmpdir string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defer response.Body.Close()
|
defer response.Body.Close()
|
||||||
|
file.WriteString("\n")
|
||||||
|
if (err != nil) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue