Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/mnightingale/rapidyenc"
"github.com/javi11/rapidyenc"
)

func TestMapFormat(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion post_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/mnightingale/rapidyenc"
"github.com/javi11/rapidyenc"
)

// --- PostHeaders tests ---
Expand Down
2 changes: 1 addition & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
30 changes: 15 additions & 15 deletions reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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 {
Expand All @@ -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)
}
Expand All @@ -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},
Expand Down
4 changes: 2 additions & 2 deletions testhelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net"
"testing"

"github.com/mnightingale/rapidyenc"
"github.com/javi11/rapidyenc"
)

// mockNNTPResponse builds a full NNTP response byte sequence.
Expand Down Expand Up @@ -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,
Expand Down
Loading