Remove unnecessary Body.close() calls
The server will close those.
This commit is contained in:
parent
86afe915f3
commit
d2eef546d5
2 changed files with 0 additions and 4 deletions
2
main.go
2
main.go
|
@ -384,8 +384,6 @@ func (br *bridge) publish(n *notification) error {
|
|||
}
|
||||
|
||||
func (br *bridge) handleWebhooks(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
|
||||
logger := br.logger.With(slog.String("handler", "/"))
|
||||
|
||||
if r.Method != http.MethodPost {
|
||||
|
|
|
@ -38,8 +38,6 @@ type silenceResponse struct {
|
|||
}
|
||||
|
||||
func (br *bridge) handleSilences(w http.ResponseWriter, r *http.Request) {
|
||||
defer r.Body.Close()
|
||||
|
||||
logger := br.logger.With(slog.String("handler", "/silences"))
|
||||
|
||||
if r.Method != http.MethodPost {
|
||||
|
|
Loading…
Reference in a new issue