(value string)
| 43 | } |
| 44 | |
| 45 | func parseUsageQueueCount(value string) (int, error) { |
| 46 | value = strings.TrimSpace(value) |
| 47 | if value == "" { |
| 48 | return 1, nil |
| 49 | } |
| 50 | count, errCount := strconv.Atoi(value) |
| 51 | if errCount != nil || count <= 0 { |
| 52 | return 0, errors.New("count must be a positive integer") |
| 53 | } |
| 54 | return count, nil |
| 55 | } |