From 833bbd9e04e1157a9826791319881c8f0b1b13eb Mon Sep 17 00:00:00 2001 From: javi11 Date: Sun, 15 Feb 2026 22:07:43 +0100 Subject: [PATCH] chore: migrate to javi11/rapidyenc fork Switch rapidyenc dependency from mnightingale to javi11 fork for continued maintenance and updates. Co-Authored-By: Claude Opus 4.6 --- client.go | 2 +- client_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- post_test.go | 2 +- reader.go | 2 +- reader_test.go | 30 +++++++++++++++--------------- testhelper_test.go | 4 ++-- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/client.go b/client.go index 3d0e05b..39f165b 100644 --- a/client.go +++ b/client.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) // ArticleEncoding describes the transfer encoding detected in an article body. diff --git a/client_test.go b/client_test.go index ac122aa..f2bd069 100644 --- a/client_test.go +++ b/client_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) func TestMapFormat(t *testing.T) { diff --git a/go.mod b/go.mod index 8e4938b..94c7eaf 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/javi11/nntppool/v4 go 1.25.1 -require github.com/mnightingale/rapidyenc v0.0.0-20251128204712-7aafef1eaf1c +require github.com/javi11/rapidyenc v0.0.0-20260215144528-f0dac5a39d34 require ( 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect diff --git a/go.sum b/go.sum index ff7dee4..2722d11 100644 --- a/go.sum +++ b/go.sum @@ -346,6 +346,8 @@ github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSo github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/javi11/rapidyenc v0.0.0-20260215144528-f0dac5a39d34 h1:c6L293xyP1pN/Zbt8O4IDjg7nbJkTrVQXVud8tTLYn8= +github.com/javi11/rapidyenc v0.0.0-20260215144528-f0dac5a39d34/go.mod h1:e7vRWF8GCI694cXiy7x2vmC/G77kkUG1/Cprdid0qYg= github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= @@ -434,8 +436,6 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mnightingale/rapidyenc v0.0.0-20251128204712-7aafef1eaf1c h1:UFEKx2AsNb8Tx80rlOwUCCz4lDxSsZ1tjq2+QDBNOUA= -github.com/mnightingale/rapidyenc v0.0.0-20251128204712-7aafef1eaf1c/go.mod h1:7KM6S+qWTq1757nqywpgj5SxykojksJepW+a28MEDdk= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= diff --git a/post_test.go b/post_test.go index 87baafc..86b4903 100644 --- a/post_test.go +++ b/post_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) // --- PostHeaders tests --- diff --git a/reader.go b/reader.go index 06cde67..12cb58e 100644 --- a/reader.go +++ b/reader.go @@ -10,7 +10,7 @@ import ( "io" "strconv" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) // YEncMeta groups yEnc metadata fields available from =ybegin and =ypart headers, diff --git a/reader_test.go b/reader_test.go index 9663681..410ca8a 100644 --- a/reader_test.go +++ b/reader_test.go @@ -8,18 +8,18 @@ import ( "testing" "time" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) // --- Feed: single/multi-line responses --- func TestFeed_SingleLineResponse(t *testing.T) { tests := []struct { - name string - input string - wantCode int - wantDone bool - wantMsg string + name string + input string + wantCode int + wantDone bool + wantMsg string }{ {"200 ok", "200 server ready\r\n", 200, true, "200 server ready"}, {"430 not found", "430 no such article\r\n", 430, true, "430 no such article"}, @@ -619,10 +619,10 @@ func TestDecodeUUChar(t *testing.T) { c byte want int }{ - {'`', 0}, // backtick → 0 - {' ', 0}, // space → 0 - {'!', 1}, // ! → 1 - {'M', 45}, // M → 45 + {'`', 0}, // backtick → 0 + {' ', 0}, // space → 0 + {'!', 1}, // ! → 1 + {'M', 45}, // M → 45 } for _, tt := range tests { if got := decodeUUChar(tt.c); got != tt.want { @@ -635,7 +635,7 @@ func TestDecodeUUCharWorkaround(t *testing.T) { // Verify formula: ((int(c)-32)&63)*4+5)/3 // For 'M' (77): ((77-32)&63)*4+5)/3 = (45*4+5)/3 = 185/3 = 61 got := decodeUUCharWorkaround('M') - want := int(((int('M') - 32) & 63 * 4) + 5) / 3 + want := int(((int('M')-32)&63*4)+5) / 3 if got != want { t.Errorf("decodeUUCharWorkaround('M') = %d, want %d", got, want) } @@ -646,10 +646,10 @@ func TestIsMultiline(t *testing.T) { code int want bool }{ - {222, true}, // BODY - {220, true}, // ARTICLE - {221, true}, // HEAD - {101, true}, // CAPABILITIES + {222, true}, // BODY + {220, true}, // ARTICLE + {221, true}, // HEAD + {101, true}, // CAPABILITIES {200, false}, {430, false}, {480, false}, diff --git a/testhelper_test.go b/testhelper_test.go index 3cd7d3d..079a4a4 100644 --- a/testhelper_test.go +++ b/testhelper_test.go @@ -7,7 +7,7 @@ import ( "net" "testing" - "github.com/mnightingale/rapidyenc" + "github.com/javi11/rapidyenc" ) // mockNNTPResponse builds a full NNTP response byte sequence. @@ -73,7 +73,7 @@ func yencMultiPart(data []byte, fileName string, part, total int, offset int64) var encoded bytes.Buffer enc, err := rapidyenc.NewEncoder(&encoded, rapidyenc.Meta{ FileName: fileName, - FileSize: int64(len(data)*total), // approximate total + FileSize: int64(len(data) * total), // approximate total PartNumber: int64(part), TotalParts: int64(total), Offset: offset,