mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	hack/pin-dependency.sh github.com/go-openapi/validate v0.19.5
This commit is contained in:
		
							
								
								
									
										14
									
								
								vendor/github.com/go-openapi/validate/formats.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/github.com/go-openapi/validate/formats.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -37,19 +37,15 @@ func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { | ||||
| 		if source == nil { | ||||
| 			return false | ||||
| 		} | ||||
| 		switch source.(type) { | ||||
| 		switch source := source.(type) { | ||||
| 		case *spec.Items: | ||||
| 			it := source.(*spec.Items) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(it.Format) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) | ||||
| 		case *spec.Parameter: | ||||
| 			par := source.(*spec.Parameter) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(par.Format) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) | ||||
| 		case *spec.Schema: | ||||
| 			sch := source.(*spec.Schema) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(sch.Format) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) | ||||
| 		case *spec.Header: | ||||
| 			hdr := source.(*spec.Header) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(hdr.Format) | ||||
| 			return kind == reflect.String && f.KnownFormats.ContainsName(source.Format) | ||||
| 		} | ||||
| 		return false | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user