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

Method URLOptions

processing/flatten_test.go:30–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (c flattenTestCase) URLOptions() string {
31 opts := testutil.NewOptionsBuilder()
32
33 opts.Add("resize").Set(0, "fill").Set(1, 300).Set(2, 300)
34 opts.Add("enlarge").Set(0, 1)
35 opts.Add("padding").Set(0, 100)
36 opts.Add("format").Set(0, c.format)
37
38 if c.background != nil {
39 opts.Add("background").
40 Set(0, c.background.R).
41 Set(1, c.background.G).
42 Set(2, c.background.B)
43 }
44
45 return opts.String()
46}
47
48func (s *FlattenTestSuite) TestBackground() {
49 testCases := []testCase[flattenTestCase]{

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