diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-15 10:19:26 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-09-15 10:19:26 -0500 |
| commit | 23cc07dd1655df05f6967ce848169ab4c658e707 (patch) | |
| tree | 15a9fa0182742274b19978db600dd8778070cc93 /print_digit_map.go | |
| parent | 58e9305753f41c401c248bfebc37b68fdd9ebe73 (diff) | |
Forbid -d when digit map cannot be shown
-d shows only the digit map and nothing else, so if the digit map cannot
be shown (e.g. radices above 36 without -f), it makes sense to forbid
this rather than print an empty string.
Diffstat (limited to 'print_digit_map.go')
| -rw-r--r-- | print_digit_map.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/print_digit_map.go b/print_digit_map.go index 1f5ad64..3e59c8c 100644 --- a/print_digit_map.go +++ b/print_digit_map.go @@ -12,9 +12,7 @@ import ( const maxSmallRadix = 36 func writeDigitMap(w io.Writer, digitMap []factors.DigitType) { - if len(digitMap) < 2 { - panic("Radices cannot be less than 2!") - } else if len(digitMap) <= 36 { + if len(digitMap) <= 36 { writeDigitMapSmall(w, digitMap) } } |
