mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 04:34:03 +03:00
Start to rewrite
This commit is contained in:
@@ -1,19 +1,11 @@
|
||||
package wrappers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
import "bytes"
|
||||
|
||||
type BufferedReader struct {
|
||||
Buffer *bytes.Buffer
|
||||
}
|
||||
|
||||
var (
|
||||
BufferedReaderContinue = errors.New("Please continue reading")
|
||||
)
|
||||
|
||||
func (b *BufferedReader) BufferedRead(p []byte, callback func() error) (int, error) {
|
||||
if b.Buffer.Len() > 0 {
|
||||
return b.flush(p)
|
||||
|
||||
Reference in New Issue
Block a user