Description

Will "forget" everything read so far.

rb := NewRegretableReader(bytes.NewBuffer([]byte{1,2,3}))
var b = make([]byte,1)
rb.Read(b) // b[0] = 1
rb.Forget()
rb.Read(b) // b[0] = 2
rb.Regret()
ioutil.ReadAll(rb.Read) // returns []byte{2,3},nil

Forget is referenced in 0 repositories