ReadAll returns a slice of bytes with the content of the given reader.
(r io.Reader)
| 36 | |
| 37 | // ReadAll returns a slice of bytes with the content of the given reader. |
| 38 | func ReadAll(r io.Reader) ([]byte, error) { |
| 39 | b, err := io.ReadAll(r) |
| 40 | return b, errors.Wrap(err, "error reading data") |
| 41 | } |
| 42 | |
| 43 | // ReadString reads one line from the given io.Reader. |
| 44 | func ReadString(r io.Reader) (string, error) { |
no outgoing calls
searching dependent graphs…