(ctx context.Context, o *options.Options, args []string)
| 80 | } |
| 81 | |
| 82 | func (p *Parser) applyResizeOption(ctx context.Context, o *options.Options, args []string) error { |
| 83 | if err := p.ensureMaxArgs(ctx, "resize", args, 8); err != nil { |
| 84 | return err |
| 85 | } |
| 86 | |
| 87 | if len(args[0]) > 0 { |
| 88 | if err := p.applyResizingTypeOption(ctx, o, args[0:1]); err != nil { |
| 89 | return err |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | if len(args) > 1 { |
| 94 | if err := p.applySizeOption(ctx, o, args[1:]); err != nil { |
| 95 | return err |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | return nil |
| 100 | } |
| 101 | |
| 102 | func (p *Parser) applyZoomOption(ctx context.Context, o *options.Options, args []string) error { |
| 103 | if err := p.ensureMaxArgs(ctx, "zoom", args, 2); err != nil { |
no test coverage detected