MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / applyRotateOption

Method applyRotateOption

options/parser/apply.go:225–235  ·  view source on GitHub ↗
(ctx context.Context, o *options.Options, args []string)

Source from the content-addressed store, hash-verified

223}
224
225func (p *Parser) applyRotateOption(ctx context.Context, o *options.Options, args []string) error {
226 if err := p.parseInt(ctx, o, keys.Rotate, args...); err != nil {
227 return err
228 }
229
230 if options.Get(o, keys.Rotate, 0)%90 != 0 {
231 return newOptionArgumentError(ctx, keys.Rotate, "Rotation angle must be a multiple of 90")
232 }
233
234 return nil
235}
236
237func (p *Parser) applyFlipOption(ctx context.Context, o *options.Options, args []string) error {
238 if err := p.ensureMaxArgs(ctx, "flip", args, 2); err != nil {

Callers 1

applyURLOptionMethod · 0.95

Calls 3

parseIntMethod · 0.95
GetFunction · 0.92
newOptionArgumentErrorFunction · 0.85

Tested by

no test coverage detected