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

Method URLOptions

processing/trim_test.go:31–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func (r trimTestCase) URLOptions() string {
32 opts := testutil.NewOptionsBuilder()
33
34 args := opts.Add("trim")
35 args.Set(0, r.threshold)
36
37 if r.color != nil {
38 args.Set(1, fmt.Sprintf("%02x%02x%02x", r.color.R, r.color.G, r.color.B))
39 }
40
41 if r.equalHor {
42 args.Set(2, 1)
43 }
44
45 if r.equalVer {
46 args.Set(3, 1)
47 }
48
49 return opts.String()
50}
51
52func (r trimTestCase) String() string {
53 var b bytes.Buffer

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
StringMethod · 0.95
NewOptionsBuilderFunction · 0.92
SetMethod · 0.45

Tested by

no test coverage detected