mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 19:42:25 -06:00 
			
		
		
		
	* start moving to bun * changing more stuff * more * and yet more * tests passing * seems stable now * more big changes * small fix * little fixes
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			561 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			561 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package pgproto3
 | 
						|
 | 
						|
import (
 | 
						|
	"io"
 | 
						|
 | 
						|
	"github.com/jackc/chunkreader/v2"
 | 
						|
)
 | 
						|
 | 
						|
// ChunkReader is an interface to decouple github.com/jackc/chunkreader from this package.
 | 
						|
type ChunkReader interface {
 | 
						|
	// Next returns buf filled with the next n bytes. If an error (including a partial read) occurs,
 | 
						|
	// buf must be nil. Next must preserve any partially read data. Next must not reuse buf.
 | 
						|
	Next(n int) (buf []byte, err error)
 | 
						|
}
 | 
						|
 | 
						|
// NewChunkReader creates and returns a new default ChunkReader.
 | 
						|
func NewChunkReader(r io.Reader) ChunkReader {
 | 
						|
	return chunkreader.New(r)
 | 
						|
}
 |