// Resolve returns the fully resolved file path, relative to the directory.
482027
func (spec DirectorySpec) Resolve(path ...string) string {
	return spec.Deps.Join(append([]string{spec.Dirname}, path...)...)
}
188920
func (d DestinationKeyspaceID) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error {
	shard, err := GetShardForKeyspaceID(allShards, d)
	if err != nil {
		return err
	}
	return addShard(shard)
}
382000
func (d DestinationKeyspaceIDs) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error {
	for _, ksid := range d {
		shard, err := GetShardForKeyspaceID(allShards, ksid)
		if err != nil {
			return err
		}
		if err := addShard(shard); err != nil {
			return err
		}
	}
	return nil
}
49047
func (section *Section) Resolve(name string) (Value, error) {
	// Used only in error state return value
	var value Value

	parts := strings.Split(name, ".")
	if len(parts) == 0 {
		return value, errors.New("no name provided")
	}

	var current Value
	current = section
	for _, part := range parts {
		if current.GetType() != SECTION {
			return value, errors.New("trying to resolve value from non-section")
		}

		nextCurrent, err := current.(*Section).Get(part)
		if err != nil {
			return value, errors.New("could not find value in section")
		}
		current = nextCurrent
	}
	return current, nil
}
1368570
func (pl *PackageLoader) Resolve(c context.Context, e *vpython.Environment) error {
	spec := e.Spec
	if spec == nil {
		return nil
	}

	expander, err := pl.expanderForTags(c, e.Pep425Tag)
	if err != nil {
		return err
	}

	// Generate CIPD client options. If no root is provided, use a temporary root.
	if pl.Options.Root != "" {
		return pl.resolveWithOpts(c, pl.Options, expander, spec)
	}

	td := filesystem.TempDir{
		Prefix: "vpython_cipd",
		CleanupErrFunc: func(tdir string, err error) {
			logging.WithError(err).Warningf(c, "Failed to clean up CIPD temporary directory [%s]", tdir)
		},
	}
	return td.With(func(tdir string) error {
		opts := pl.Options
		opts.Root = tdir

		return pl.resolveWithOpts(c, opts, expander, spec)
	})
}
1119577
func (w *WorklogClient) Resolve(ctx context.Context, orgID *identity.ID, ident *apitypes.WorklogID) error {
	return w.singleItemWorker(ctx, "POST", orgID, ident, nil)
}
618616
func (db *DB) Resolve(n *Node) *Node {
	if n.Seq() > db.NodeSeq(n.ID()) {
		return n
	}
	return db.Node(n.ID())
}
39291
func (s *Schema) Resolve(name string) common.Type {
	return s.Types[name]
}
992343
func (this *Promise) Resolve(v interface{}) (e error) {
	return this.setResult(&PromiseResult{v, RESULT_SUCCESS})
}
843666
func (sr *StaticResolver) Resolve(ctx context.Context) (string, connect.CertURI, error) {
	return sr.Addr, sr.CertURI, nil
}
74495
func (d DestinationKeyRanges) Resolve(allShards []*topodatapb.ShardReference, addShard func(shard string) error) error {
	for _, kr := range d {
		if err := processKeyRange(allShards, kr, addShard); err != nil {
			return err
		}
	}
	return nil
}
1065615
func (prs *ResizeParser) Resolve(param string) string {
	if !strings.HasPrefix(param, resizeParam+".") {
		return ""
	}
	return strings.TrimPrefix(param, resizeParam+".")
}
920847
func (w *Worklog) Resolve(ctx context.Context, n *observer.Notifier,
	orgID *identity.ID, ident *apitypes.WorklogID) error {

	item, err := w.Get(ctx, orgID, ident)
	if err != nil {
		return err
	}

	if item == nil {
		return nil
	}

	for t, h := range w.handlers {
		if t&item.Type() == 0 {
			continue
		}

		return h.resolve(ctx, n, orgID, item)
	}

	panic("worklog handler not found for type")
}
956753
func ResolvePath(path string) string {
	path = strings.Replace(path, "~", os.Getenv("HOME"), -1)
	// Using $HOME seems to work just fine with `deisctl config`, but not `deisctl refresh-units`
	path = strings.Replace(path, "$HOME", os.Getenv("HOME"), -1)
	return path
}
603669
func ResolveRootfs(uncleanRootfs string) (string, error) {
	rootfs, err := filepath.Abs(uncleanRootfs)
	if err != nil {
		return "", err
	}
	return filepath.EvalSymlinks(rootfs)
}
1020757
func (f *FileResourceLookup) ResolvePath(path, relativeTo string) string {
	vs := strings.SplitN(path, ":", 2)
	if len(vs) != 2 || filepath.IsAbs(vs[0]) {
		return path
	}
	vs[0] = relativePath(vs[0], relativeTo)
	return strings.Join(vs, ":")
}
294388
func Resolve(zc ZK, key registry.Path, value string) (registry.Path, string, error) {
	// de-reference the pointer...
	switch {
	case strings.Index(value, PrefixEnv) == 0:
		p := value[len(PrefixEnv):]
		n, err := zc.Get(p)
		switch {
		case err == ErrNotExist:
			return key, "", nil
		case err != nil:
			return key, "", err
		}
		glog.Infoln("Resolving", key, "=", value, "==>", n.GetValueString())
		return Resolve(zc, key, n.GetValueString())
	case strings.Index(value, PrefixZk) == 0:
		p := value[len(PrefixZk):]
		n, err := zc.Get(p)
		switch {
		case err == ErrNotExist:
			return key, "", nil
		case err != nil:
			return key, "", err
		}
		glog.Infoln("Resolving", key, "=", value, "==>", n.GetValueString())
		return Resolve(zc, key, n.GetValueString())
	default:
		return key, value, nil
	}
}