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

Method Int

pkg/modules/api/formdata.go:112–114  ·  view source on GitHub ↗

Int binds a form field to an int variable. It populates an error if the value is not int. var foo int ctx.FormData().Int("foo", &foo, 2)

(key string, target *int, defaultValue int)

Source from the content-addressed store, hash-verified

110//
111// ctx.FormData().Int("foo", &foo, 2)
112func (form *FormData) Int(key string, target *int, defaultValue int) *FormData {
113 return form.mustValue(key, target, defaultValue)
114}
115
116// MandatoryInt binds a form field to an int variable. It populates an
117// error if the value is not int, or is empty, or the "key" does not exist.

Callers 15

ExecMethod · 0.80
TestParsedFlags_MustIntFunction · 0.80
TestNewTraceRequestFunction · 0.80
TestNewTraceResponseFunction · 0.80
TestClientRequestFunction · 0.80
TestClientResponseFunction · 0.80
DescriptorMethod · 0.80
telemetryMiddlewareFunction · 0.80

Calls 1

mustValueMethod · 0.95

Tested by 10

TestParsedFlags_MustIntFunction · 0.64
TestNewTraceRequestFunction · 0.64
TestNewTraceResponseFunction · 0.64
TestClientRequestFunction · 0.64
TestClientResponseFunction · 0.64
TestFormData_IntFunction · 0.64