GetObject gets an object from an object storer and decodes it.
(s storer.EncodedObjectStorer, h plumbing.Hash)
| 49 | |
| 50 | // GetObject gets an object from an object storer and decodes it. |
| 51 | func GetObject(s storer.EncodedObjectStorer, h plumbing.Hash) (Object, error) { |
| 52 | o, err := s.EncodedObject(plumbing.AnyObject, h) |
| 53 | if err != nil { |
| 54 | return nil, err |
| 55 | } |
| 56 | |
| 57 | return DecodeObject(s, o) |
| 58 | } |
| 59 | |
| 60 | // DecodeObject decodes an encoded object into an Object and associates it to |
| 61 | // the given object storer. |
no test coverage detected