MCPcopy Create free account
hub / github.com/datastax/cql-proxy / toFrameBodyReader

Function toFrameBodyReader

codecs/partial_codecs.go:425–432  ·  view source on GitHub ↗
(source io.Reader)

Source from the content-addressed store, hash-verified

423}
424
425func toFrameBodyReader(source io.Reader) (*FrameBodyReader, error) {
426 if reader, ok := source.(*FrameBodyReader); ok {
427 return reader, nil
428 } else if buf, ok := source.(*bytes.Buffer); ok {
429 return NewFrameBodyReader(buf.Bytes()), nil
430 }
431 return nil, errors.New("source is not a frame body reader")
432}

Callers 3

DecodeMethod · 0.85
DecodeMethod · 0.85
DecodeMethod · 0.85

Calls 1

NewFrameBodyReaderFunction · 0.85

Tested by

no test coverage detected