// Get gets the list of file hash from the server
184604
func (up *Updater) Get() error {
	log.Println("Creating hash list request...")
	req, err := http.NewRequest("GET", up.Server, nil)
	if err != nil {
		return err
	}

	req.SetBasicAuth(up.Auth.Username, up.Auth.Password)

	log.Println("Sending hash list request...")
	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		return err
	}

	if resp.StatusCode == http.StatusUnauthorized {
		return errors.New("Error Unautorized")
	}

	log.Println("Reading hash list response's body...")
	var buf bytes.Buffer
	_, err = buf.ReadFrom(resp.Body)
	if err != nil {
		return err
	}

	log.Println("Parsing hash list response's body...")
	ri := &ResponseInit{}
	err = json.Unmarshal(buf.Bytes(), &ri)
	if err != nil {
		log.Println("Body is", buf.Bytes())
		return err
	}
	resp.Body.Close()

	// copy hash list
	if ri.Success {
		log.Println("Copying hash list...")
		up.RemoteHashes = ri.Hashes
		up.LocalHashes = map[string]string{}
		log.Println("Done")
	}

	return nil
}
130830
func (i RedisClientWrapper) Get(key string) ([]byte, error) {
	val, ok := i.Client.Get(key).Result()
	if ok != nil {
		return nil, fmt.Errorf("Error: %s", ok)
	}
	return []byte(val), nil
}
273271
func (h *Hashes) Get(index int) (hash *Hash, _ error) {
	if index < 0 || index >= len(h.hashes) {
		return nil, errors.New("index out of bounds")
	}
	return &Hash{h.hashes[index]}, nil
}
742287
func (this *Response) Get(f string) string {
	return this.Writer.Header().Get(f)
}
1047275
func (c *ObjectLRU) Get(k plumbing.Hash) (plumbing.EncodedObject, bool) {
	c.mut.Lock()
	defer c.mut.Unlock()

	ee, ok := c.cache[k]
	if !ok {
		return nil, false
	}

	c.ll.MoveToFront(ee)
	return ee.Value.(plumbing.EncodedObject), true
}
1072878
func (c *Cache) Get(key string) (resp []byte, ok bool) {
	key = keyToFilename(key)
	resp, err := c.d.Read(key)
	if err != nil {
		return []byte{}, false
	}
	return resp, true
}
437192
func (srv *HandlerServer) Get(params Params) (*Image, error) {
	im, err := srv.Server.Get(params)
	if err != nil {
		return nil, err
	}
	im, err = srv.Handler.Handle(im, params)
	if err != nil {
		return nil, err
	}
	return im, nil
}
598026
func (f *Filestore) Get(c cid.Cid) (blocks.Block, error) {
	blk, err := f.bs.Get(c)
	switch err {
	case nil:
		return blk, nil
	case blockstore.ErrNotFound:
		return f.fm.Get(c)
	default:
		return nil, err
	}
}
621924
func (r *Memory) Get(key string) (interface{}, error) {
	r.Lock()
	defer r.Unlock()

	return r.cache.Get(key)
}
118771
func (hm *SyncedHashMap) Get(key Hashable) (interface{}, bool) {
	hm.RLock()
	defer hm.RUnlock()
	if _, ok := (*hm).keys[key.Hash()]; ok {
		v, ok := (*hm).values[key.Hash()]
		return v, ok
	}
	return nil, false
}
201196
func (c *syncClient) Get(arg0 string) (result []byte, err Error) {
	arg0bytes := []byte(arg0)

	var resp Response
	resp, err = c.conn.ServiceRequest(&GET, [][]byte{arg0bytes})
	if err == nil {
		result = resp.GetBulkData()
	}
	return result, err

}
883230
func (b BlockServerMeasured) Get(
	ctx context.Context, tlfID tlf.ID, id kbfsblock.ID,
	context kbfsblock.Context, cacheType DiskBlockCacheType) (
	buf []byte, serverHalf kbfscrypto.BlockCryptKeyServerHalf, err error) {
	b.getTimer.Time(func() {
		buf, serverHalf, err = b.delegate.Get(
			ctx, tlfID, id, context, cacheType)
	})
	return buf, serverHalf, err
}
1034646
func (d *Dtrie) Get(key interface{}) interface{} {
	return get(d.root, d.hasher(key), key).Value()
}
169684
func (s *FilesystemStore) Get(r *http.Request, name string) (*Session, error) {
	return GetRegistry(r).Get(s, name)
}
749118
func (srv *Server) Get(params imageserver.Params) (*imageserver.Image, error) {
	enc, format, err := getEncoderFormat(srv.DefaultFormat, params)
	if err != nil {
		return nil, err
	}
	nim, err := srv.Provider.Get(params)
	if err != nil {
		return nil, err
	}
	im, err := encode(nim, format, enc, params)
	if err != nil {
		return nil, err
	}
	return im, nil
}
183091
func (h HTTPOrigin) Get(file string) ([]byte, error) {
	requestURL, err := url.Parse(h.Base)
	if err != nil {
		log.Error("url parse:", err)
		return []byte{}, err
	}
	requestURL.Path = filepath.Join(requestURL.Path, file)

	resp, err := http.Get(requestURL.String())
	if err != nil {
		log.Warning("http request:", err)
		return []byte{}, err
	}
	buf, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Warning("http transmission:", err)
		return []byte{}, err
	}
	return buf, nil
}
1174844
func (s *GRPCStorage) Get(ctx context.Context, fn *FileNameMsg) (*ByteMsg, error) {
	data, err := s.backend.Get(fn.FileName)
	if err != nil {
		return &ByteMsg{}, err
	}
	return &ByteMsg{Data: data}, nil
}