status-go/vendor/github.com/anacrolix/missinggo/v2/reader_context.go

17 lines
289 B
Go
Raw Normal View History

2022-03-10 09:44:48 +00:00
package missinggo
import "context"
type ContextedReader struct {
R ReadContexter
Ctx context.Context
}
func (me ContextedReader) Read(b []byte) (int, error) {
return me.R.ReadContext(me.Ctx, b)
}
type ReadContexter interface {
ReadContext(context.Context, []byte) (int, error)
}