mirror of
https://github.com/containers/skopeo.git
synced 2025-08-01 06:55:43 +00:00
document imageDestOptions.warnAboutIneffectiveOptions()
Signed-off-by: Erol Keskin <erolkeskin.dev@gmail.com>
This commit is contained in:
parent
90c5033886
commit
0a42c33af9
@ -245,6 +245,7 @@ func (opts *imageOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// imageDestOptions is a superset of imageOptions specialized for image destinations.
|
// imageDestOptions is a superset of imageOptions specialized for image destinations.
|
||||||
|
// Every user should call imageDestOptions.warnAboutIneffectiveOptions() as part of handling the CLI
|
||||||
type imageDestOptions struct {
|
type imageDestOptions struct {
|
||||||
*imageOptions
|
*imageOptions
|
||||||
dirForceCompression bool // Compress layers when saving to the dir: transport
|
dirForceCompression bool // Compress layers when saving to the dir: transport
|
||||||
@ -297,6 +298,8 @@ func (opts *imageDestOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
return ctx, err
|
return ctx, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// warnAboutIneffectiveOptions warns if any ineffective option was set by the user
|
||||||
|
// Every user should call this as part of handling the CLI
|
||||||
func (opts *imageDestOptions) warnAboutIneffectiveOptions(destTransport types.ImageTransport) {
|
func (opts *imageDestOptions) warnAboutIneffectiveOptions(destTransport types.ImageTransport) {
|
||||||
if destTransport.Name() != directory.Transport.Name() {
|
if destTransport.Name() != directory.Transport.Name() {
|
||||||
if opts.dirForceCompression {
|
if opts.dirForceCompression {
|
||||||
|
Loading…
Reference in New Issue
Block a user