Internal function to validate `requireCompressionFormatMatch` for copySingleImageOptions
(options *Options)
| 187 | |
| 188 | // Internal function to validate `requireCompressionFormatMatch` for copySingleImageOptions |
| 189 | func shouldRequireCompressionFormatMatch(options *Options) (bool, error) { |
| 190 | if options.ForceCompressionFormat && (options.DestinationCtx == nil || options.DestinationCtx.CompressionFormat == nil) { |
| 191 | return false, fmt.Errorf("cannot use ForceCompressionFormat with undefined default compression format") |
| 192 | } |
| 193 | return options.ForceCompressionFormat, nil |
| 194 | } |
| 195 | |
| 196 | // Image copies image from srcRef to destRef, using policyContext to validate |
| 197 | // source image admissibility. It returns the manifest which was written to |
no outgoing calls
no test coverage detected
searching dependent graphs…