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

Method Bool

pkg/modules/api/formdata.go:92–94  ·  view source on GitHub ↗

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

(key string, target *bool, defaultValue bool)

Source from the content-addressed store, hash-verified

90//
91// ctx.FormData().Bool("foo", &foo, true)
92func (form *FormData) Bool(key string, target *bool, defaultValue bool) *FormData {
93 return form.mustValue(key, target, defaultValue)
94}
95
96// MandatoryBool binds a form field to a bool variable. It populates an
97// error if the value is not bool, is empty, or the "key" does not exist.

Callers 15

TestParsedFlags_MustBoolFunction · 0.80
DescriptorMethod · 0.80
DescriptorMethod · 0.80
TestFormData_BoolFunction · 0.80
FormDataPdfSplitModeFunction · 0.80
FormDataPdfFormatsFunction · 0.80
FormDataPdfEncryptFunction · 0.80
mergeRouteFunction · 0.80
splitRouteFunction · 0.80
DescriptorMethod · 0.80
printToPdfAttrsFunction · 0.80

Calls 1

mustValueMethod · 0.95

Tested by 4

TestParsedFlags_MustBoolFunction · 0.64
TestFormData_BoolFunction · 0.64
TestMainFunction · 0.64