MCPcopy
hub / github.com/elastic/go-elasticsearch / Seek

Method Seek

esutil/json_reader.go:71–76  ·  view source on GitHub ↗

Seek implements the io.Seeker interface.

(offset int64, whence int)

Source from the content-addressed store, hash-verified

69
70// Seek implements the io.Seeker interface.
71func (r *JSONReader) Seek(offset int64, whence int) (int64, error) {
72 if err := r.ensureEncoded(); err != nil {
73 return 0, err
74 }
75 return r.buf.Seek(offset, whence)
76}
77
78// WriteTo implements the io.WriterTo interface.
79func (r *JSONReader) WriteTo(w io.Writer) (int64, error) {

Callers 15

TestJSONReaderFunction · 0.95
computeLengthMethod · 0.80
writeBodyMethod · 0.80
WriteToMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80
UnmarshalJSONMethod · 0.80

Calls 1

ensureEncodedMethod · 0.95

Tested by 1

TestJSONReaderFunction · 0.76