(ctx context.Context, o *options.Options, args []string)
| 432 | } |
| 433 | |
| 434 | func (p *Parser) applyFilenameOption(ctx context.Context, o *options.Options, args []string) error { |
| 435 | if err := p.ensureMaxArgs(ctx, keys.Filename, args, 2); err != nil { |
| 436 | return err |
| 437 | } |
| 438 | |
| 439 | if len(args) > 1 && len(args[1]) > 0 { |
| 440 | if encoded, _ := strconv.ParseBool(args[1]); encoded { |
| 441 | return p.parseBase64String(ctx, o, keys.Filename, args[0]) |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | o.Set(keys.Filename, args[0]) |
| 446 | |
| 447 | return nil |
| 448 | } |
| 449 | |
| 450 | func (p *Parser) applyExpiresOption(ctx context.Context, o *options.Options, args []string) error { |
| 451 | if err := p.ensureMaxArgs(ctx, keys.Expires, args, 1); err != nil { |
no test coverage detected