distribution/registry/client/auth
Sebastiaan van Stijn c8ba5d7081
registry/client: combine SuccessStatus and HandleErrorResponse
The SuccessStatus acted on the response's status code, and was used to return
early, before checking the same status code with HandleErrorResponse.

This patch combines both functions into a HandleHTTPResponseError, which
returns an error for "non-success" status-codes, which simplifies handling
of responses, and makes some logic slightly more idiomatic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-08 14:40:41 +02:00
..
challenge format code with gofumpt 2022-11-03 22:48:20 +01:00
api_version.go Fix typo in Version doc 2015-07-08 11:02:47 -07:00
session.go registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
session_test.go Enable bodyclose linter 2023-08-19 09:45:44 +01:00