diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 16:20:50 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-08-30 20:02:26 -0500 |
| commit | 32320351ec98bbdf526d1587d073e4f3a382f2d5 (patch) | |
| tree | 683dc167f2993f3da75e9fa5c0cfabe92e94d36c /print_digit_map.go | |
| parent | 347e49fba8dc1f9ec01c18fe35628a35e1432f1e (diff) | |
Extract factor info into separate struct
This achieves two things:
- Decouples my code by putting the printing code into its own file
- Makes it easier to make alternate ways of printing (e.g. a compact
mode)
Diffstat (limited to 'print_digit_map.go')
| -rw-r--r-- | print_digit_map.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/print_digit_map.go b/print_digit_map.go index d4f7f3d..4def177 100644 --- a/print_digit_map.go +++ b/print_digit_map.go @@ -9,7 +9,7 @@ import ( ) func writeDigitMap(w io.Writer, digitMap []factors.DigitType) { - if len(digitMap) <= 2 { + if len(digitMap) < 2 { panic("Radices cannot be less than 2!") } else if len(digitMap) <= 36 { writeDigitMapSmall(w, digitMap) |
