add err checking for places where an error variable was assigned but not checked
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user