MCPcopy Create free account
hub / github.com/gotenberg/gotenberg / Inches

Method Inches

pkg/modules/api/formdata.go:173–179  ·  view source on GitHub ↗

Inches bind a form field to a float64 variable. It populates an error if the value cannot be computed back to inches. var foo float64 ctx.FormData().Inches("foo", &foo, 2.0)

(key string, target *float64, defaultValue float64)

Source from the content-addressed store, hash-verified

171//
172// ctx.FormData().Inches("foo", &foo, 2.0)
173func (form *FormData) Inches(key string, target *float64, defaultValue float64) *FormData {
174 form.inches(key, target)
175 if *target == -math.MaxFloat64 {
176 *target = defaultValue
177 }
178 return form
179}
180
181// MandatoryInches binds a form field to a float64 variable. It populates
182// an error if the value cannot be computed back to inches, is empty, or the

Callers 2

TestFormData_InchesFunction · 0.80

Calls 1

inchesMethod · 0.95

Tested by 1

TestFormData_InchesFunction · 0.64