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))
|
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
|
||||||
defer resp.Body.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue