Documentation ¶
Index ¶
- Constants
- Variables
- func HandleRecovery(e any) error
- func ReadAllLimit(r io.Reader, limit int) ([]byte, error)
- func Write(w io.Writer, p []byte, np *int64) error
- func WriteAndReset(w *Writer, iow io.Writer, np *int64) error
- func WriteAndResetPanic(w *Writer, iow io.Writer, np *int64)
- func WritePanic(w io.Writer, p []byte, np *int64)
- func WriteString(w io.Writer, s string, np *int64) error
- func WriteStringPanic(w io.Writer, s string, np *int64)
- func WriteTo(wt io.WriterTo, w io.Writer, np *int64) error
- func WriteToPanic(wt io.WriterTo, w io.Writer, np *int64)
- type Data
- type OpWriter
- func (w *OpWriter) AppendByte(b byte) *OpWriter
- func (w *OpWriter) AppendBytes(bs []byte) *OpWriter
- func (w *OpWriter) AppendEmbeddedBytes(bs []byte) *OpWriter
- func (w *OpWriter) AppendEmbeddedString(s string) *OpWriter
- func (w *OpWriter) AppendString(s string) *OpWriter
- func (w *OpWriter) AppendUint16(u uint16) *OpWriter
- func (w *OpWriter) AppendUint32(u uint32) *OpWriter
- func (w *OpWriter) AppendUint64(u uint64) *OpWriter
- func (w *OpWriter) AppendWriter(writer io.WriterTo, size int) *OpWriter
- func (w *OpWriter) Bytes() []byte
- func (w *OpWriter) Clear()
- func (w *OpWriter) Read(p []byte) (n int, err error)
- func (w *OpWriter) Reset()
- func (w *OpWriter) SetBuf(buf []byte) *OpWriter
- func (w *OpWriter) Size() int
- func (w *OpWriter) WriteTo(_w io.Writer) (n int64, err error)
- type Writer
- func (w *Writer) Bytes() []byte
- func (w *Writer) Len() int
- func (w *Writer) Remain() int
- func (w *Writer) Reset()
- func (w *Writer) ResetBuf(buf []byte)
- func (w *Writer) Write(p []byte) (n int, err error)
- func (w *Writer) WriteByte(b byte) *Writer
- func (w *Writer) WriteBytes(p []byte) (n int)
- func (w *Writer) WriteBytesAnd(p []byte) *Writer
- func (w *Writer) WriteLittleUint16(u uint16) *Writer
- func (w *Writer) WriteLittleUint32(u uint32) *Writer
- func (w *Writer) WriteLittleUint64(u uint64) *Writer
- func (w *Writer) WriteString(s string) (n int)
- func (w *Writer) WriteStringAnd(s string) *Writer
- func (w *Writer) WriteUint16(u uint16) *Writer
- func (w *Writer) WriteUint32(u uint32) *Writer
- func (w *Writer) WriteUint64(u uint64) *Writer
- func (w *Writer) WriterTo(wt io.Writer, np *int64) error
- func (w *Writer) WriterToAndReset(wt io.Writer, np *int64) error
Constants ¶
View Source
const ( BytesOpSize = 1 + bytesSize StringOpSize = 1 + stringSize )
Variables ¶
View Source
var ErrLimit = errors.New("read reached limit")
Functions ¶
func HandleRecovery ¶
Types ¶
type OpWriter ¶
type OpWriter struct {
// contains filtered or unexported fields
}
func NewOpWriter ¶
func OpWriterAppendEmbedded ¶
func (*OpWriter) AppendByte ¶
func (*OpWriter) AppendBytes ¶
func (*OpWriter) AppendEmbeddedBytes ¶
func (*OpWriter) AppendEmbeddedString ¶
func (*OpWriter) AppendString ¶
func (*OpWriter) AppendUint16 ¶
func (*OpWriter) AppendUint32 ¶
func (*OpWriter) AppendUint64 ¶
func (*OpWriter) AppendWriter ¶
type Writer ¶
type Writer struct { Buf []byte // contains filtered or unexported fields }
func (*Writer) WriteBytes ¶
func (*Writer) WriteBytesAnd ¶
func (*Writer) WriteLittleUint16 ¶
func (*Writer) WriteLittleUint32 ¶
func (*Writer) WriteLittleUint64 ¶
func (*Writer) WriteString ¶
func (*Writer) WriteStringAnd ¶
func (*Writer) WriteUint16 ¶
func (*Writer) WriteUint32 ¶
func (*Writer) WriteUint64 ¶
Click to show internal directories.
Click to hide internal directories.