// Task.Result() returns []projections.ProjectionDetails
502885
func (m *Manager) ListOneTimeAsync(userCredentials *cli.UserCredentials) *tasks.Task {
	return m.client.ListOneTime(m.httpEndpoint, userCredentials)
}
1352005
func GetTaskAncestry(taskName string, tasks []wfv1.DAGTask) []string {
	taskByName := make(map[string]wfv1.DAGTask)
	for _, task := range tasks {
		taskByName[task.Name] = task
	}

	visited := make(map[string]bool)
	var getAncestry func(s string)
	getAncestry = func(currTask string) {
		task := taskByName[currTask]
		for _, depTask := range task.Dependencies {
			getAncestry(depTask)
		}
		if currTask != taskName {
			visited[currTask] = true
		}
	}

	getAncestry(taskName)
	ancestry := make([]string, 0)
	for ancestor := range visited {
		ancestry = append(ancestry, ancestor)
	}
	return ancestry
}
1256316
func (f *BatchFuture) Results() (uint64, error) {
	<-f.waitCh
	return f.index, f.err
}
845211
func (m *Projection) Equal(t Task) bool {
	if m == nil && t == nil {
		return true
	}
	if m == nil && t != nil {
		return false
	}
	if m != nil && t == nil {
		return false
	}
	s, ok := t.(*Projection)
	if !ok {
		return false
	}
	if m.Final != s.Final {
		return false
	}
	if !m.Proj.Equal(s.Proj) {
		return false
	}
	if !m.PlanBase.EqualBase(s.PlanBase) {
		return false
	}
	return true
}
621133
func (r *LambdaResults) ResultsForRegion(region string) []AggData {
	lambdasOfRegion := make([]AggData, 0)
	for _, lambda := range r.Lambdas {
		if lambda.Region == region {
			lambdasOfRegion = append(lambdasOfRegion, lambda)
		}
	}
	return lambdasOfRegion
}
839163
func (c *MockConnection) Result(operation Operation) (ResultDesc, bool) {
	op, ok := c.operations[operation]
	return op, ok
}
677464
func ReflectTaskResults(taskResults []*TaskResult) ([]reflect.Value, error) {
	resultValues := make([]reflect.Value, len(taskResults))
	for i, taskResult := range taskResults {
		resultValue, err := ReflectValue(taskResult.Type, taskResult.Value)
		if err != nil {
			return nil, err
		}
		resultValues[i] = resultValue
	}
	return resultValues, nil
}
467672
func (m *TaskManager) Get(ctx context.Context, id string) (runtime.Task, error) {
	return m.tasks.Get(ctx, id)
}
1151182
func (list *List) PrintResult(result string) int {
	var bytes int

	bytes = list.PrintHead()

	list.colors.Highlight.Set()
	printBytes, _ := list.Print(" ", result)
	color.Unset()

	return bytes + printBytes + list.Println()
}
1157956
func (s *SubscribeToken) Result() map[string]byte {
	s.m.RLock()
	defer s.m.RUnlock()
	return s.subResult
}
59403
func (m *TaskManager) Tasks(ctx context.Context, all bool) ([]runtime.Task, error) {
	return m.tasks.GetAll(ctx, all)
}
760856
func (c oauthClient) Tasks() ([]wl.Task, error) {
	lists, err := c.Lists()
	if err != nil {
		return nil, err
	}

	listCount := len(lists)
	c.logger.Debug(
		"tasks",
		map[string]interface{}{"listCount": listCount},
	)

	tasksChan := make(chan []wl.Task, listCount)
	idErrChan := make(chan idErr, listCount)
	for _, l := range lists {
		go func(list wl.List) {
			c.logger.Debug(
				"tasks - getting tasks for list",
				map[string]interface{}{"listID": list.ID},
			)
			tasks, err := c.TasksForListID(list.ID)
			idErrChan <- idErr{idType: "list", id: list.ID, err: err}
			tasksChan <- tasks
		}(l)
	}

	e := multiIDErr{}
	for i := 0; i < listCount; i++ {
		idErr := <-idErrChan
		if idErr.err != nil {
			c.logger.Debug(
				"tasks - error received getting tasks for list",
				map[string]interface{}{"listID": idErr.id, "err": err},
			)
			e.addError(idErr)
		}
	}

	totalTasks := []wl.Task{}
	for i := 0; i < listCount; i++ {
		tasks := <-tasksChan
		totalTasks = append(totalTasks, tasks...)
	}

	if len(e.errors()) > 0 {
		return totalTasks, e
	}

	return totalTasks, nil
}
57577
func (_class TaskClass) GetAll(sessionID SessionRef) (_retval []TaskRef, _err error) {
	_method := "task.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertTaskRefSetToGo(_method + " -> ", _result.Value)
	return
}
470871
func (s *TasksService) FindResultByTask(t Task) (*http.Response, error) {
	return s.client.GetResultByURI(t.ResultURI)
}
69032
func (r *DecodeHopIteratorResponse) Result() (HopIterator, lnwire.FailCode) {
	return r.HopIterator, r.FailCode
}
1139194
func (trs *TaskResultSet) Reap() *TaskResultSet {
	for i := 0; i < len(trs.results); i++ {
		var trch = trs.chz[i]
		select {
		case result, ok := <-trch:
			if ok {
				// Write result.
				trs.results[i] = taskResultOK{
					TaskResult: result,
					OK:         true,
				}
			} else {
				// We already wrote it.
			}
		default:
			// Do nothing.
		}
	}
	return trs
}
942526
func (e *FavoriteList) Result() keybase1.FavoritesResult {
	return keybase1.FavoritesResult{
		FavoriteFolders: e.result.Favorites,
		IgnoredFolders:  e.result.Ignored,
		NewFolders:      e.result.New,
	}
}