MCPcopy
hub / github.com/danielgtaylor/huma / boolTag

Function boolTag

schema.go:350–362  ·  view source on GitHub ↗
(f reflect.StructField, tag string, def bool)

Source from the content-addressed store, hash-verified

348}
349
350func boolTag(f reflect.StructField, tag string, def bool) bool {
351 if v := f.Tag.Get(tag); v != "" {
352 switch v {
353 case "true":
354 return true
355 case "false":
356 return false
357 default:
358 panic(fmt.Errorf("invalid bool tag '%s' for field '%s': %v", tag, f.Name, v))
359 }
360 }
361 return def
362}
363
364func intTag(f reflect.StructField, tag string) *int {
365 if v := f.Tag.Get(tag); v != "" {

Callers 5

SchemaFromFieldFunction · 0.85
schemaFromTypeFunction · 0.85
multiPartFormFileSchemaFunction · 0.85
findParamsFunction · 0.85
processOutputTypeFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…