// GetDiffID finds a layer DiffID from a digest.
344539
func (serv *v2MetadataService) GetDiffID(dgst digest.Digest) (layer.DiffID, error) {
	if serv.store == nil {
		return layer.DiffID(""), errors.New("no metadata storage")
	}
	diffIDBytes, err := serv.store.Get(serv.digestNamespace(), serv.digestKey(dgst))
	if err != nil {
		return layer.DiffID(""), err
	}

	return layer.DiffID(diffIDBytes), nil
}
1189266
func (wav Reader) GetDumbReader() (r io.Reader, err error) {
	// move reader to the first sample
	_, err = wav.input.Seek(int64(wav.firstSamplePos), os.SEEK_SET)
	if err != nil {
		return nil, err
	}

	return wav.input, nil
}
571114
func GetMapDiff(map1, map2 map[string]PackageInfo) PackageDiff {
	diff := diffMaps(map1, map2)
	diffVal := reflect.ValueOf(diff)
	packDiff := diffVal.Interface().(PackageDiff)
	return packDiff
}
1242259
func (v Uint32) Get(deflt uint32) uint32 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
636961
func (s *fs) Get(dgst digest.Digest) ([]byte, error) {
	s.RLock()
	defer s.RUnlock()

	return s.get(dgst)
}
1050123
func (v Int) Get(deflt int) int {
	if !v.Defined {
		return deflt
	}
	return v.V
}
540356
func (whisper *Whisper) GetFilter(id string) *Filter {
	return whisper.filters.Get(id)
}
875228
func (idserv *V1IDService) Get(v1ID, registry string) (layer.DiffID, error) {
	if idserv.store == nil {
		return "", errors.New("no v1IDService storage")
	}
	if err := v1.ValidateID(v1ID); err != nil {
		return layer.DiffID(""), err
	}

	idBytes, err := idserv.store.Get(idserv.namespace(), registry+","+v1ID)
	if err != nil {
		return layer.DiffID(""), err
	}
	return layer.DiffID(idBytes), nil
}
1139274
func (c *Client) getFileDecoder(file string) decoder.API {
	for _, dc := range c.decoders {
		if dc.IsProcessable(file) {
			return dc
		}
	}
	return nil
}
1034805
func (v Uint64) Get(deflt uint64) uint64 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
216509
func (fs *FSObjects) getUploadIDDir(bucket, object, uploadID string) string {
	return pathJoin(fs.fsPath, minioMetaMultipartBucket, getSHA256Hash([]byte(pathJoin(bucket, object))), uploadID)
}
781234
func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, maxLines, maxLineCharacteres, maxFiles int) (*Diff, error) {
	repo, err := OpenRepository(repoPath)
	if err != nil {
		return nil, err
	}

	commit, err := repo.GetCommit(afterCommitID)
	if err != nil {
		return nil, err
	}

	cmd := NewCommand()
	if len(beforeCommitID) == 0 {
		// First commit of repository
		if commit.ParentCount() == 0 {
			cmd.AddArguments("show", "--full-index", afterCommitID)
		} else {
			c, _ := commit.Parent(0)
			cmd.AddArguments("diff", "--full-index", "-M", c.ID.String(), afterCommitID)
		}
	} else {
		cmd.AddArguments("diff", "--full-index", "-M", beforeCommitID, afterCommitID)
	}

	stdout, w := io.Pipe()
	done := make(chan error)
	var diff *Diff
	go func() {
		diff = ParsePatch(done, maxLines, maxLineCharacteres, maxFiles, stdout)
	}()

	stderr := new(bytes.Buffer)
	err = cmd.RunInDirTimeoutPipeline(2*time.Minute, repoPath, w, stderr)
	w.Close() // Close writer to exit parsing goroutine
	if err != nil {
		return nil, concatenateError(err, stderr.String())
	}

	return diff, <-done
}
618803
func (v Int64) Get(deflt int64) int64 {
	if !v.Defined {
		return deflt
	}
	return v.V
}
870813
func (dbcr *DiskBlockCacheRemote) GetTlfIDs(
	_ context.Context, _ DiskBlockCacheType) ([]tlf.ID, error) {
	panic("GetTlfIDs() not implemented in DiskBlockCacheRemote")
}
175735
func (d *ADS1x15Driver) ReadDifference(diff int, gain int, dataRate int) (value float64, err error) {
	if err = d.checkChannel(diff); err != nil {
		return
	}

	return d.rawRead(diff, gain, dataRate)
}
835739
func (d *ResourceDiff) get(addr []string, source string) getResult {
	result, err := d.multiReader.ReadFieldMerge(addr, source)
	if err != nil {
		panic(err)
	}

	return d.finalizeResult(addr, result)
}
230948
func (v Int8) Get(deflt int8) int8 {
	if !v.Defined {
		return deflt
	}
	return v.V
}