package
1.3.48
Repository: https://github.com/sandwich-go/boost.git
Documentation: pkg.go.dev

# README

xio

由于 Readblock 操作,内部为每一次 Read 启动了独立协程协助读取,如果超时或退出,则返回错误

例子

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
r = NewReader(ctx, bytes.NewReader(buf))
defer cancel()
_, err := r.Read(buf2)
xpanic.WhenError(err)

# Functions

NewReader 返回context敏感的io reader.