(sourceParam string, dest any, bitSize int, valueMustExist bool)
| 746 | } |
| 747 | |
| 748 | func (b *ValueBinder) uintValue(sourceParam string, dest any, bitSize int, valueMustExist bool) *ValueBinder { |
| 749 | if b.failFast && b.errors != nil { |
| 750 | return b |
| 751 | } |
| 752 | |
| 753 | value := b.ValueFunc(sourceParam) |
| 754 | if value == "" { |
| 755 | if valueMustExist { |
| 756 | b.setError(b.ErrorFunc(sourceParam, []string{}, "required field value is empty", nil)) |
| 757 | } |
| 758 | return b |
| 759 | } |
| 760 | |
| 761 | return b.uint(sourceParam, value, dest, bitSize) |
| 762 | } |
| 763 | |
| 764 | func (b *ValueBinder) uint(sourceParam string, value string, dest any, bitSize int) *ValueBinder { |
| 765 | n, err := strconv.ParseUint(value, 10, bitSize) |
no test coverage detected