(value string, bitSize int, field reflect.Value)
| 483 | } |
| 484 | |
| 485 | func 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 | |
| 496 | var ( |
| 497 | // NOT supported by bind as you can NOT check easily empty struct being actual file or not |
no outgoing calls
no test coverage detected
searching dependent graphs…