// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise.
357423
func (l *LabelsSearchResult) GetIncompleteResults() bool {
	if l == nil || l.IncompleteResults == nil {
		return false
	}
	return *l.IncompleteResults
}
1242193
func (c *Client) GetPlugins(details bool) *GetPluginsResult {
	r := &GetPluginsResult{}

	var path string
	if details {
		path = "/plugins?details"
	} else {
		path = "/plugins"
	}

	resp, err := c.do("GET", path, ContentTypeJSON)
	if err != nil {
		r.Err = err
		return r
	}

	switch resp.Meta.Type {
	// TODO change this to concrete const type when Joel adds it
	case rbody.PluginListType:
		// Success
		b := resp.Body.(*rbody.PluginList)
		r.LoadedPlugins = convertLoadedPlugins(b.LoadedPlugins)
		r.AvailablePlugins = convertAvailablePlugins(b.AvailablePlugins)
		return r
	case rbody.ErrorType:
		r.Err = resp.Body.(*rbody.Error)
	default:
		r.Err = ErrAPIResponseMetaType
	}
	return r
}
227458
func (s *resultSorter) Results() []lsp.SymbolInformation {
	res := make([]lsp.SymbolInformation, len(s.results))
	for i, s := range s.results {
		res[i] = s.SymbolInformation
	}
	return res
}
504925
func ResultsFromIterator(q Query, iter Iterator) Results {
	if iter.Close == nil {
		iter.Close = noopClose
	}
	return &resultsIter{
		query: q,
		next:  iter.Next,
		close: iter.Close,
	}
}
352961
func (d *ResourceDiff) getExact(addr []string, source string) getResult {
	result, err := d.multiReader.ReadFieldExact(addr, source)
	if err != nil {
		panic(err)
	}

	return d.finalizeResult(addr, result)
}
1109591
func (c *DOM) DiscardSearchResults(searchId string) (*gcdmessage.ChromeResponse, error) {
	var v DOMDiscardSearchResultsParams
	v.SearchId = searchId
	return c.DiscardSearchResultsWithParams(&v)
}
1060519
func (f *Future) GetResult() (interface{}, error) {
	f.lock.Lock()
	if f.triggered {
		f.lock.Unlock()
		return f.item, f.err
	}
	f.lock.Unlock()

	f.wg.Wait()
	return f.item, f.err
}
264127
func (u *UpdateCheckRunOptions) GetCompletedAt() Timestamp {
	if u == nil || u.CompletedAt == nil {
		return Timestamp{}
	}
	return *u.CompletedAt
}
324702
func (b *Bar) PrependCompleted() *Bar {
	b.PrependFunc(func(b *Bar) string {
		return b.CompletedPercentString()
	})
	return b
}
205791
func (a *API) GetResult(domain, result int) (*Result, error) {
	dst := new(Result)
	url := a.BuildURL("/v2/domain/%d/result/%d", domain, result)
	err := a.Get(url, Params{}, dst)
	return dst, err
}
654319
func (q *Query) resultsAsJSON() string {
	res := &search.SearchResult{
		Blobs: q.Blobs,
		Describe: &search.DescribeResponse{
			Meta: q.Meta,
		},
	}
	var buf bytes.Buffer
	enc := json.NewEncoder(&buf)
	if err := enc.Encode(res); err != nil {
		fmt.Println(fmt.Sprintf("Error marshaling search results: %v", err))
		return ""
	}
	return buf.String()
}
1047689
func (g *Generation) CheckNotComplete() error {
	if g.doc.Completed == 0 {
		return nil
	}

	msg := "committed"
	if g.doc.GenerationId == 0 {
		msg = "aborted"
	}
	return errors.New("branch was already " + msg)
}
611414
func (d *domainClient) GetSearchResults(ctx context.Context, args *GetSearchResultsArgs) (reply *GetSearchResultsReply, err error) {
	reply = new(GetSearchResultsReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "DOM.getSearchResults", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "DOM.getSearchResults", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "DOM", Op: "GetSearchResults", Err: err}
	}
	return
}
499121
func (buildRes BuildRunResultsModel) ResultsCount() int {
	return len(buildRes.SuccessSteps) + len(buildRes.FailedSteps) + len(buildRes.FailedSkippableSteps) + len(buildRes.SkippedSteps)
}
537386
func (s *TasksService) FindResult(t TaskID) (*http.Response, error) {
	return s.client.GetResultByURI(t.ResultURI())
}
1032541
func (cmd *Cmd) updateCompleters() {
	if c := cmd.GetCompleter(""); c == nil { // default completer
		cmd.commandNames = make([]string, 0, len(cmd.Commands))
		for name := range cmd.Commands {
			cmd.commandNames = append(cmd.commandNames, name)
		}
		sort.Strings(cmd.commandNames) // for help listing

		cmd.AddCompleter("", NewWordCompleter(func() []string {
			return cmd.commandNames
		}, func(s, l string) bool {
			return s == l // check if we are at the beginning of the line
		}))

		cmd.AddCompleter("help", NewWordCompleter(func() []string {
			return cmd.commandNames
		}, func(s, l string) bool {
			return strings.HasPrefix(l, "help ")
		}))
	}
}
162614
func (c *CreateCheckRunOptions) GetCompletedAt() Timestamp {
	if c == nil || c.CompletedAt == nil {
		return Timestamp{}
	}
	return *c.CompletedAt
}