func (f file_store_t) GetBlob(name string) (io.ReadCloser, error) { r, err := os.Open(path.Join(string(f), name)) if err != nil { if os.IsNotExist(err) { err = store.NotFoundError(name) } else { err = errors.Forward(err, "Unable to Get() `%s`", name) } } return r, err }
func (s *store_t) GetBlob(name string) (io.ReadCloser, error) { key := path.Join(s.prefix, name) elem, err := s.conn.Get(key) if err != nil { return nil, err } if elem == nil { return nil, store.NotFoundError(name) } return ioutil.NopCloser(bytes.NewReader(elem.Bytes())), err }