diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-11-07 07:50:23 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-11-09 19:47:16 -0500 |
| commit | 2cc0f9607872b8bd4fc6be2656a7b7a769b538b2 (patch) | |
| tree | 5e14b4ffcbf7c0d85f17b0ed468a08b4bafa11c1 /factor_info.go | |
| parent | 7d2916a50187992f72e80ed667468e8c0b125d27 (diff) | |
Reduce golang requirement to go1.18
go1.21, the previous requirement, was released a few months ago, so not
all systems have adopted it. go1.18 is old enough that most systems
should support it, but it introduces generics, which my testing code is
highly dependent on, so I can't easily go any earlier.
Diffstat (limited to 'factor_info.go')
| -rw-r--r-- | factor_info.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/factor_info.go b/factor_info.go index a6710e7..f3193b5 100644 --- a/factor_info.go +++ b/factor_info.go @@ -5,7 +5,7 @@ import ( "fmt" "io" "math" - "slices" + "sort" ) // FactorInfo contains all of the information this program @@ -64,7 +64,9 @@ func getFactorInfo(a args) *factorInfo { radix := a.Radix r_factors := factors.Factors(radix) - slices.Sort(r_factors) + sort.Slice(r_factors, func(i, j int) bool { + return r_factors[i] < r_factors[j] + }) var totativeDigits []uint32 = nil if a.TotativeDigits && radix < maxExtended { |
