package
1.13.12
Repository: https://github.com/qiniu/x.git
Documentation: pkg.go.dev

# Packages

This package provide a method to read and replace http.Request's body.

# Functions

NewBuffer creates a random read/write memory file that supports ReadAt/WriteAt methods instead of Read/Write: b := bytes.NewBuffer() b.Truncate(100) b.WriteAt([]byte("hello"), 100) slice := make([]byte, 105) n, err := b.ReadAt(slice, 0) ...
NewReader create a readonly stream for byte slice: var slice []byte ..
NewWriter NewWriter creates a write stream with a limited capacity: slice := make([]byte, 1024) w := bytes.NewWriter(slice) ..
Unlike bytes.Replace, this Replace does replace operations in place.
ReplaceAt does a replace operation at position `off` in place.
ReplaceOne does a replace operation from `from` position in place.

# Structs

No description provided by the author
Unlike the standard library's bytes.Reader, this Reader supports Seek.
Writer implements a write stream with a limited capacity.