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

Method String

processing/processing_test.go:76–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76func (r sizeTestCase) String() string {
77 b := bytes.NewBuffer(nil)
78
79 fmt.Fprintf(b, "%s:%dx%d", r.resizingType, r.width, r.height)
80
81 if r.limit > 0 {
82 fmt.Fprintf(b, ":limit:%d", r.limit)
83 }
84
85 if r.enlarge {
86 fmt.Fprintf(b, "_en:%t", r.enlarge)
87 }
88
89 if r.extend {
90 fmt.Fprintf(b, "_ex:%t", r.extend)
91 }
92
93 if r.extendAR {
94 fmt.Fprintf(b, "_exAR:%t", r.extendAR)
95 }
96
97 if r.rotate != 0 {
98 fmt.Fprintf(b, "_rotate:%d", r.rotate)
99 }
100
101 if r.paddingTop > 0 || r.paddingRight > 0 || r.paddingBottom > 0 || r.paddingLeft > 0 {
102 fmt.Fprintf(
103 b, "_padding:%dx%dx%dx%d",
104 r.paddingTop, r.paddingRight, r.paddingBottom, r.paddingLeft,
105 )
106 }
107
108 return b.String()
109}
110
111func (r sizeTestCase) ShortName() string {
112 return fmt.Sprintf("%dx%d", r.width, r.height)

Callers 1

TestResultSizeLimitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected