// FGet is like Get but accepts a os.File instead of a file path.
355080
func FGet(f *os.File, name string) ([]byte, error) {
	return get(f.Name(), name, func(name string, data []byte) (int, error) {
		return fgetxattr(f, name, data)
	})
}
1233362
func (F *Frisby) Get(url string) *Frisby {
	F.Method = "GET"
	F.Url = url
	return F
}
636961
func (s *fs) Get(dgst digest.Digest) ([]byte, error) {
	s.RLock()
	defer s.RUnlock()

	return s.get(dgst)
}
1363891
func (f *File) download() error {
	out, err := f.c.Files.Download(&dropbox.DownloadInput{f.Name})
	if err != nil {
		if strings.HasPrefix(err.Error(), "path/not_found/") {
			return &os.PathError{"open", f.Name, syscall.ENOENT}
		}
		return err
	}

	f.reader = out.Body
	return nil
}
258464
func (m *Miniredis) HGet(k, f string) string {
	return m.DB(m.selectedDB).HGet(k, f)
}
1184087
func Get(out interface{}, path string) interface{} {
	result := get(reflect.ValueOf(out), path)

	if result.Kind() != reflect.Invalid {
		return result.Interface()
	}

	return nil
}
696021
func (f *fsClient) get() (io.ReadCloser, *probe.Error) {
	tmppath := f.PathURL.Path
	// Golang strips trailing / if you clean(..) or
	// EvalSymlinks(..). Adding '.' prevents it from doing so.
	if strings.HasSuffix(tmppath, string(f.PathURL.Separator)) {
		tmppath = tmppath + "."
	}

	// Resolve symlinks.
	_, e := filepath.EvalSymlinks(tmppath)
	if e != nil {
		err := f.toClientError(e, f.PathURL.Path)
		return nil, err.Trace(f.PathURL.Path)
	}
	fileData, e := os.Open(f.PathURL.Path)
	if e != nil {
		err := f.toClientError(e, f.PathURL.Path)
		return nil, err.Trace(f.PathURL.Path)
	}
	return fileData, nil
}
1092503
func getInput(filename string) (*os.File, error) {
	if filename == "-" || filename == "" {
		return os.Stdin, nil
	}

	return os.Open(filename)
}
738876
func (s *Server) Get(ctx context.Context, filePath string) ([]byte, topo.Version, error) {
	nodePath := path.Join(s.root, filePath)

	resp, err := s.cli.Get(ctx, nodePath)
	if err != nil {
		return nil, nil, convertError(err, nodePath)
	}
	if len(resp.Kvs) != 1 {
		return nil, nil, topo.NewError(topo.NoNode, nodePath)
	}

	return resp.Kvs[0].Value, EtcdVersion(resp.Kvs[0].ModRevision), nil
}
619459
func (f FakeGetter) Get(name string) (*api.Secret, error) {
	return f.Secret, f.Err
}
631848
func (d *DiskStorer) Get(key string) (value string, err error) {
	if !validKey(key) {
		return "", errNoSession{}
	}

	filePath := path.Join(d.folderPath, key)

	d.mut.RLock()
	defer d.mut.RUnlock()

	_, err = os.Stat(filePath)
	if err != nil {
		return "", errors.Wrapf(err, "unable to stat session file: %s", filePath)
	}

	contents, err := ioutil.ReadFile(filePath)
	if err != nil {
		return "", errors.Wrapf(err, "unable to read file: %s", filePath)
	}

	return string(contents), nil
}
1367959
func (c Client) FGetObject(bucketName, objectName, filePath string, opts GetObjectOptions) error {
	return c.fGetObjectWithContext(context.Background(), bucketName, objectName, filePath, opts)
}
1125410
func (fp *FS) Get(key *url.URL) (out interface{}, err error) {
	if pdebug.Enabled {
		g := pdebug.Marker("provider.FS.Get(%s)", key.String()).BindError(&err)
		defer g.End()
	}

	if strings.ToLower(key.Scheme) != "file" {
		return nil, errors.New("unsupported scheme '" + key.Scheme + "'")
	}

	// Everything other than "Path" is ignored
	path := filepath.Clean(filepath.Join(fp.Root, key.Path))

	mpkey := &url.URL{Path: path}
	if x, err := fp.mp.Get(mpkey); err == nil {
		return x, nil
	}

	fi, err := os.Stat(path)
	if err != nil {
		return nil, errors.Wrap(err, "failed to stat local resource")
	}

	if fi.IsDir() {
		return nil, errors.New("target is not a file")
	}

	f, err := os.Open(path)
	if err != nil {
		return nil, errors.Wrap(err, "failed to open local resource")
	}
	defer f.Close()

	var x interface{}
	dec := json.NewDecoder(f)
	if err := dec.Decode(&x); err != nil {
		return nil, errors.Wrap(err, "failed to parse JSON local resource")
	}

	fp.mp.Set(path, x)

	return x, nil
}
377519
func (v Optional) Get(deflt A) A {
	if !v.Defined {
		return deflt
	}
	return v.V
}
1165229
func (this *Server) Get(path string, fn ...func(*Request, *Response, func())) string {

	/*
	   If there is no function then this is really a call to .Set()
	*/

	if len(fn) == 0 {
		return this.Set(path)
	}

	/*
	   Otherwise it's a call to .Verb()
	*/

	this.Verb("GET", path, fn...)

	return ""
}
215381
func (f *FilesystemStore) Get(name string) ([]byte, error) {
	p, err := f.getPath(name)
	if err != nil {
		return nil, err
	}
	meta, err := ioutil.ReadFile(p)
	if err != nil {
		if os.IsNotExist(err) {
			err = ErrMetaNotFound{Resource: name}
		}
		return nil, err
	}
	return meta, nil
}
408803
func (c *LFUCache) Get(key interface{}) (interface{}, error) {
	v, err := c.get(key, false)
	if err == KeyNotFoundError {
		return c.getWithLoader(key, true)
	}
	return v, err
}