( ctx context.Context, o *options.Options, options []urlOption, allowAll bool, usedPresets ...string, )
| 121 | } |
| 122 | |
| 123 | func (p *Parser) applyURLOptions( |
| 124 | ctx context.Context, |
| 125 | o *options.Options, |
| 126 | options []urlOption, |
| 127 | allowAll bool, |
| 128 | usedPresets ...string, |
| 129 | ) error { |
| 130 | allowAll = allowAll || len(p.config.AllowedProcessingOptions) == 0 |
| 131 | |
| 132 | for _, opt := range options { |
| 133 | if !allowAll && !slices.Contains(p.config.AllowedProcessingOptions, opt.Name) { |
| 134 | return newForbiddenOptionError(ctx, "processing", opt.Name) |
| 135 | } |
| 136 | |
| 137 | if err := p.applyURLOption(ctx, o, opt.Name, opt.Args, usedPresets...); err != nil { |
| 138 | return err |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | return nil |
| 143 | } |
| 144 | |
| 145 | func (p *Parser) defaultProcessingOptions( |
| 146 | ctx context.Context, |
no test coverage detected