internal/bufio/bufio.go
func (r *Reader) ReadCesu8(size int) []byte {
	if r.err != nil {
		return nil
	}
	p := make([]byte, size)
	var n int
	n, r.err = io.ReadFull(r.rd, p)
	r.cnt += n
	if r.err != nil {
		return nil
	}
	r.tr.Reset()
	if n, _, r.err = r.tr.Transform(p, p, true); r.err != nil { // inplace transformation
		return nil
	}
	return p[:n]
}
func (r *Reader) ReadCesu8(size int) []byte {
	if r.err != nil {
		return nil
	}
	p := make([]byte, size)
	var n int
	n, r.err = io.ReadFull(r.rd, p)
	r.cnt += n
	if r.err != nil {
		return nil
	}
	r.tr.Reset()
	if n, _, r.err = r.tr.Transform(p, p, true); r.err != nil { // inplace transformation
		return nil
	}
	return p[:n]
}
func ( r * Reader ) ReadCesu8 ( size int ) [ ] byte { if r . err != nil { return nil } p := make ( [ ] byte , size ) var n int n , r . err = io . ReadFull ( r . rd , p ) r . cnt += n if r . err != nil { return nil } r . tr . Reset ( ) if n , _ , r . err = r . tr . Transform ( p , p , true ) ; r . err != nil { // inplace transformation return nil } return p [ : n ] }
// ReadCesu8 reads a size CESU-8 encoded byte sequence and returns an UTF-8 byte slice.
ReadCesu8 reads a size CESU - 8 encoded byte sequence and returns an UTF - 8 byte slice .