MCPcopy
hub / github.com/gin-gonic/gin / TrySet

Method TrySet

binding/form_mapping.go:75–77  ·  view source on GitHub ↗

TrySet tries to set a value by request's form source (like map[string][]string)

(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions)

Source from the content-addressed store, hash-verified

73
74// TrySet tries to set a value by request's form source (like map[string][]string)
75func (form formSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (isSet bool, err error) {
76 return setByForm(value, field, form, tagValue, opt)
77}
78
79func mappingByPtr(ptr any, setter setter, tag string) error {
80 _, err := mapping(reflect.ValueOf(ptr), emptyField, setter, tag)

Callers

nothing calls this directly

Calls 1

setByFormFunction · 0.85

Tested by

no test coverage detected