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

Function intTag

schema.go:364–373  ·  view source on GitHub ↗
(f reflect.StructField, tag string)

Source from the content-addressed store, hash-verified

362}
363
364func intTag(f reflect.StructField, tag string) *int {
365 if v := f.Tag.Get(tag); v != "" {
366 if i, err := strconv.Atoi(v); err == nil {
367 return &i
368 } else {
369 panic(fmt.Errorf("invalid int tag '%s' for field '%s': %v (%w)", tag, f.Name, v, err))
370 }
371 }
372 return nil
373}
374
375func floatTag(f reflect.StructField, tag string) *float64 {
376 if v := f.Tag.Get(tag); v != "" {

Callers 1

SchemaFromFieldFunction · 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…