MCPcopy Index your code
hub / github.com/labstack/echo / setFloatField

Function setFloatField

bind.go:485–494  ·  view source on GitHub ↗
(value string, bitSize int, field reflect.Value)

Source from the content-addressed store, hash-verified

483}
484
485func setFloatField(value string, bitSize int, field reflect.Value) error {
486 if value == "" {
487 value = "0.0"
488 }
489 floatVal, err := strconv.ParseFloat(value, bitSize)
490 if err == nil {
491 field.SetFloat(floatVal)
492 }
493 return err
494}
495
496var (
497 // NOT supported by bind as you can NOT check easily empty struct being actual file or not

Callers 1

setWithProperTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…