Skip to content

Commit ccd9b15

Browse files
authored
transport: Fix broken links to distribution docs (#2136)
The links are now pinned to an early 2019 API spec, which is when the code being commented was written. Latest main was not used because the API has changed slightly and the code would not match the referred API spec. Signed-off-by: Guzman <[email protected]>
1 parent 8d9c9ef commit ccd9b15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/v1/remote/transport/error.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
// Error implements error to support the following error specification:
28-
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors
28+
// https://github.com/distribution/distribution/blob/aac2f6c8b7c5a6c60190848bab5cbeed2b5ba0a9/docs/spec/api.md#errors
2929
type Error struct {
3030
Errors []Diagnostic `json:"errors,omitempty"`
3131
// The http status code returned.
@@ -111,7 +111,7 @@ func (d Diagnostic) String() string {
111111
type ErrorCode string
112112

113113
// The set of error conditions a registry may return:
114-
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors-2
114+
// https://github.com/distribution/distribution/blob/aac2f6c8b7c5a6c60190848bab5cbeed2b5ba0a9/docs/spec/api.md#errors-2
115115
const (
116116
BlobUnknownErrorCode ErrorCode = "BLOB_UNKNOWN"
117117
BlobUploadInvalidErrorCode ErrorCode = "BLOB_UPLOAD_INVALID"
@@ -170,7 +170,7 @@ func CheckError(resp *http.Response, codes ...int) error {
170170
}
171171

172172
func makeError(resp *http.Response, body []byte) *Error {
173-
// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors
173+
// https://github.com/distribution/distribution/blob/aac2f6c8b7c5a6c60190848bab5cbeed2b5ba0a9/docs/spec/api.md#errors
174174
structuredError := &Error{}
175175

176176
// This can fail if e.g. the response body is not valid JSON. That's fine,

0 commit comments

Comments
 (0)