(ctx context.Context, o *options.Options, args []string)
| 235 | } |
| 236 | |
| 237 | func (p *Parser) applyFlipOption(ctx context.Context, o *options.Options, args []string) error { |
| 238 | if err := p.ensureMaxArgs(ctx, "flip", args, 2); err != nil { |
| 239 | return err |
| 240 | } |
| 241 | |
| 242 | if len(args[0]) > 0 { |
| 243 | if err := p.parseBool(ctx, o, keys.FlipHorizontal, args[0]); err != nil { |
| 244 | return err |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | if len(args) > 1 && len(args[1]) > 0 { |
| 249 | if err := p.parseBool(ctx, o, keys.FlipVertical, args[1]); err != nil { |
| 250 | return err |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | return nil |
| 255 | } |
| 256 | |
| 257 | func (p *Parser) applyQualityOption(ctx context.Context, o *options.Options, args []string) error { |
| 258 | return p.parseQualityInt(ctx, o, keys.Quality, 0, args...) |
no test coverage detected