ReadUint16 reads 2 bytes and returns them as a BigEndian uint16
(r io.Reader)
| 146 | |
| 147 | // ReadUint16 reads 2 bytes and returns them as a BigEndian uint16 |
| 148 | func ReadUint16(r io.Reader) (uint16, error) { |
| 149 | var v uint16 |
| 150 | if err := binary.Read(r, binary.BigEndian, &v); err != nil { |
| 151 | return 0, err |
| 152 | } |
| 153 | |
| 154 | return v, nil |
| 155 | } |
| 156 | |
| 157 | // ReadHash reads a plumbing.Hash from r |
| 158 | func ReadHash(r io.Reader) (plumbing.Hash, error) { |
searching dependent graphs…