(rawValue string, defaultValue, minValue, maxValue uint64, allowZero bool)
| 1525 | } |
| 1526 | |
| 1527 | func GetRestrictedIntFromString(rawValue string, defaultValue, minValue, maxValue uint64, allowZero bool) uint64 { |
| 1528 | var value *uint64 |
| 1529 | if rawValue != "" { |
| 1530 | intValue, err := strconv.ParseUint(rawValue, 10, 64) |
| 1531 | if err != nil { |
| 1532 | value = nil |
| 1533 | } else { |
| 1534 | value = &intValue |
| 1535 | } |
| 1536 | } |
| 1537 | |
| 1538 | return GetRestrictedInt( |
| 1539 | value, |
| 1540 | defaultValue, |
| 1541 | minValue, |
| 1542 | maxValue, |
| 1543 | allowZero, |
| 1544 | ) |
| 1545 | } |
| 1546 | |
| 1547 | func GetRestrictedInt(rawValue *uint64, defaultValue, minValue, maxValue uint64, allowZero bool) uint64 { |
| 1548 |
no test coverage detected