MCPcopy
hub / github.com/nats-io/nats.go / Read

Method Read

nats.go:2265–2274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2263}
2264
2265func (r *natsReader) Read() ([]byte, error) {
2266 if r.off >= 0 {
2267 off := r.off
2268 r.off = -1
2269 return r.buf[off:r.n], nil
2270 }
2271 var err error
2272 r.n, err = r.r.Read(r.buf)
2273 return r.buf[:r.n], err
2274}
2275
2276func (r *natsReader) ReadString(delim byte) (string, error) {
2277 var s string

Callers 2

ReadStringMethod · 0.95
readLoopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected