v1.16.9
ADDED: * netx.IsPub * encodingx/hexx Rest are mostly small corrections and docs
This commit is contained in:
@@ -26,6 +26,10 @@ func (c *CtxIO) GetChunkLen() (size uint) {
|
||||
return c.l.GetChunkLen()
|
||||
}
|
||||
|
||||
func (c *CtxIO) Len() (unread int) {
|
||||
return c.buf.Len()
|
||||
}
|
||||
|
||||
func (c *CtxIO) Read(p []byte) (n int, err error) {
|
||||
|
||||
var nr int64
|
||||
|
||||
@@ -147,6 +147,17 @@ type (
|
||||
ContextReader
|
||||
ContextWriter
|
||||
}
|
||||
|
||||
/*
|
||||
LenReader allows one to read bytes (conforming to [io.Reader]),
|
||||
and also provides a Len() method which returns an int of remaining unread bytes.
|
||||
[bytes.Buffer] and [bytes.Reader] conforms to this, but see [CtxIO] for
|
||||
a package-provided type.
|
||||
*/
|
||||
LenReader interface {
|
||||
io.Reader
|
||||
Len() (unread int)
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -172,6 +183,7 @@ type (
|
||||
* [ChunkReadWriter]
|
||||
* [ContextReadWriter]
|
||||
* [SizedCopyBufferer]
|
||||
* [LenReader]
|
||||
|
||||
Unlike [XIO], it must be non-nil (see [NewCtxIO]) since it maintains state
|
||||
(though technically, one does not need to call [NewCtxIO] if they call
|
||||
|
||||
Reference in New Issue
Block a user