MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / peek

Method peek

xmlparser/decoder.go:816–823  ·  view source on GitHub ↗

peek peeks at the next n bytes without advancing the reader. If an error occurs, it sets d.err and returns false.

(n int)

Source from the content-addressed store, hash-verified

814// peek peeks at the next n bytes without advancing the reader.
815// If an error occurs, it sets d.err and returns false.
816func (d *Decoder) peek(n int) ([]byte, bool) {
817 b, err := d.r.Peek(n)
818 if err != nil {
819 d.err = err
820 return nil, false
821 }
822 return b, true
823}
824
825// mustPeek peeks at the next n bytes without advancing the reader.
826// If an error occurs, it sets d.err and returns false.

Callers 2

TokenMethod · 0.95
mustPeekMethod · 0.95

Calls 1

PeekMethod · 0.65

Tested by

no test coverage detected