fix: Potential nil pointer dereference
This commit is contained in:
parent
8f13f765a1
commit
7562b86894
1 changed files with 1 additions and 1 deletions
|
@ -96,10 +96,10 @@ func sendRequest(url string, data *Webhook) error {
|
|||
}
|
||||
|
||||
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
|
||||
defer resp.Body.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue