add err checking for places where an error variable was assigned but not checked

This commit is contained in:
Yaser Azfar
2019-12-03 15:56:58 +13:00
parent 606abd586a
commit c554529df5
4 changed files with 12 additions and 0 deletions

View File

@@ -43,6 +43,9 @@ func htmlfile(filename string,next_path string,last_path string)(error){
var add_string2 string = "\n<a href=\"./"+last_path+"\">下一页</a>\n"
file.Seek(1,2)
_,err=file.WriteString(add_string1)
if(err!=nil){
fmt.Println("err:",err)
}
_,err=file.WriteString(add_string2)
file.Seek(0,0)
if(err!=nil){

View File

@@ -79,6 +79,9 @@ func (self *Visitor) md2html(arg map[string]string) error {
req.Header.Set("Authorization", "token "+token)
//
resp, err := client.Do(req)
if err!=nil {
fmt.Println("err:",err)
}
defer resp.Body.Close()