From ea8373ed78113af57315ae4523d42dfed3a3b1fe Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 28 Mar 2026 19:58:37 +0000 Subject: network, internal/progress, format/packfile/ingest: Use WriteFlusher --- network/protocol/pktline/encoder.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'network/protocol/pktline/encoder.go') diff --git a/network/protocol/pktline/encoder.go b/network/protocol/pktline/encoder.go index b4c6dbf0..3d92ca19 100644 --- a/network/protocol/pktline/encoder.go +++ b/network/protocol/pktline/encoder.go @@ -3,26 +3,20 @@ package pktline import ( "fmt" "io" -) -// WriteFlusher is the output transport contract required by Encoder. -// -// Write emits framed bytes and Flush pushes buffered transport state. -type WriteFlusher interface { - io.Writer - Flush() error -} + "codeberg.org/lindenii/furgit/common/iowrap" +) // Encoder writes pkt-line frames to a flush-capable output transport. // // It writes exactly one frame per method call and does not auto-chunk data. type Encoder struct { - w WriteFlusher + w iowrap.WriteFlusher maxData int } // NewEncoder creates an encoder over w. -func NewEncoder(w WriteFlusher) *Encoder { +func NewEncoder(w iowrap.WriteFlusher) *Encoder { return &Encoder{ w: w, maxData: LargePacketDataMax, -- cgit v1.3.1-10-gc9f91