mirror of
				https://github.com/containers/skopeo.git
				synced 2025-10-31 01:12:41 +00:00 
			
		
		
		
	fix(deps): update module github.com/containers/storage to v1.52.0
... and c/image/v5 to main Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
		
				
					committed by
					
						 Miloslav Trmač
						Miloslav Trmač
					
				
			
			
				
	
			
			
			
						parent
						
							6baa928c1b
						
					
				
				
					commit
					58ff9fdb27
				
			
							
								
								
									
										18
									
								
								vendor/github.com/go-openapi/errors/api.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/go-openapi/errors/api.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -55,9 +55,15 @@ func (a apiError) MarshalJSON() ([]byte, error) { | ||||
| // New creates a new API error with a code and a message | ||||
| func New(code int32, message string, args ...interface{}) Error { | ||||
| 	if len(args) > 0 { | ||||
| 		return &apiError{code, fmt.Sprintf(message, args...)} | ||||
| 		return &apiError{ | ||||
| 			code:    code, | ||||
| 			message: fmt.Sprintf(message, args...), | ||||
| 		} | ||||
| 	} | ||||
| 	return &apiError{ | ||||
| 		code:    code, | ||||
| 		message: message, | ||||
| 	} | ||||
| 	return &apiError{code, message} | ||||
| } | ||||
|  | ||||
| // NotFound creates a new not found error | ||||
| @@ -130,10 +136,14 @@ func flattenComposite(errs *CompositeError) *CompositeError { | ||||
| // MethodNotAllowed creates a new method not allowed error | ||||
| func MethodNotAllowed(requested string, allow []string) Error { | ||||
| 	msg := fmt.Sprintf("method %s is not allowed, but [%s] are", requested, strings.Join(allow, ",")) | ||||
| 	return &MethodNotAllowedError{code: http.StatusMethodNotAllowed, Allowed: allow, message: msg} | ||||
| 	return &MethodNotAllowedError{ | ||||
| 		code:    http.StatusMethodNotAllowed, | ||||
| 		Allowed: allow, | ||||
| 		message: msg, | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // ServeError the error handler interface implementation | ||||
| // ServeError implements the http error handler interface | ||||
| func ServeError(rw http.ResponseWriter, r *http.Request, err error) { | ||||
| 	rw.Header().Set("Content-Type", "application/json") | ||||
| 	switch e := err.(type) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user