Skip to content

Commit a6397b5

Browse files
committed
lint
1 parent a126c37 commit a6397b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/keycloak/rest.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ func (client *KeycloakClient) PostForm(ctx context.Context, url string, data url
105105
}
106106

107107
func tryParseResponse(resp *http.Response, result any) error {
108-
defer resp.Body.Close()
108+
defer func() {
109+
if err := resp.Body.Close(); err != nil {
110+
fmt.Printf("Warning, could not close HTTP response: %s", err.Error())
111+
}
112+
}()
109113

110114
outBuf := new(bytes.Buffer)
111115
_, err := outBuf.ReadFrom(resp.Body)

0 commit comments

Comments
 (0)