MCPcopy Create free account
hub / github.com/chanify/chanify / tryFormValue

Function tryFormValue

core/msgparam.go:350–358  ·  view source on GitHub ↗
(form *multipart.Form, name string, value string)

Source from the content-addressed store, hash-verified

348}
349
350func tryFormValue(form *multipart.Form, name string, value string) string {
351 if len(value) <= 0 {
352 vs := form.Value[name]
353 if len(vs) > 0 {
354 return vs[0]
355 }
356 }
357 return value
358}
359
360func tryFormValues(form *multipart.Form, name string, value []string) []string {
361 if len(value) <= 0 {

Callers 1

ParseFormDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected