// isSingleLineList returns true if:
// * they were previously formatted entirely on one line
// * they consist entirely of literals
// * there are either no heredoc strings or the list has exactly one element
// * there are no line comments
487920
func (printer) isSingleLineList(l *ast.ListType) bool {
	for _, item := range l.List {
		if item.Pos().Line != l.Lbrack.Line {
			return false
		}

		lit, ok := item.(*ast.LiteralType)
		if !ok {
			return false
		}

		if lit.Token.Type == token.HEREDOC && len(l.List) != 1 {
			return false
		}

		if lit.LineComment != nil {
			return false
		}
	}

	return true
}
490657
func IsExactlySinglePointer(target interface{}) bool {
	//	va, isVa := target.(reflect.Value)
	//	if isVa {
	//		return IsExactlySinglePointerType(va.Type())
	//	}
	typ := reflect.ValueOf(target).Type()
	return IsExactlySinglePointerType(typ)
}
642842
func fileList() ([]string, error) {
	camliRootPath, err := osutil.GoPackagePath("perkeep.org")
	if err != nil {
		log.Fatal("Package perkeep.org not found in $GOPATH (or $GOPATH not defined).")
	}
	uiDir := filepath.Join(camliRootPath, "server", "perkeepd", "ui")
	closureDepsFile := filepath.Join(closureGitDir, "closure", "goog", "deps.js")

	f, err := os.Open(closureDepsFile)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	allClosureDeps, err := closure.DeepParseDeps(f)
	if err != nil {
		return nil, err
	}

	uiDeps, err := closure.GenDeps(http.Dir(uiDir))
	if err != nil {
		return nil, err
	}
	_, requ, err := closure.ParseDeps(bytes.NewReader(uiDeps))
	if err != nil {
		return nil, err
	}

	nameDone := make(map[string]bool)
	jsfilesDone := make(map[string]bool)
	for _, deps := range requ {
		for _, dep := range deps {
			if _, ok := nameDone[dep]; ok {
				continue
			}
			jsfiles := allClosureDeps[dep]
			for _, filename := range jsfiles {
				if _, ok := jsfilesDone[filename]; ok {
					continue
				}
				jsfilesDone[filename] = true
			}
			nameDone[dep] = true
		}
	}
	jsfiles := []string{
		"AUTHORS",
		"LICENSE",
		"README.md",
		filepath.Join("closure", "goog", "base.js"),
		filepath.Join("closure", "goog", "bootstrap", "nodejs.js"),
		filepath.Join("closure", "goog", "bootstrap", "webworkers.js"),
		filepath.Join("closure", "goog", "css", "common.css"),
		filepath.Join("closure", "goog", "css", "toolbar.css"),
		filepath.Join("closure", "goog", "deps.js"),
	}
	prefix := filepath.Join("closure", "goog")
	for k := range jsfilesDone {
		jsfiles = append(jsfiles, filepath.Join(prefix, k))
	}
	sort.Strings(jsfiles)
	return jsfiles, nil
}
603341
func DayInList(t time.Time, days []int) bool {
	for _, day := range days {
		if t.Day() == day {
			return true
		}
	}
	return false
}
968858
func (p *printer) identList(list []*ast.Ident, indent bool, multiLine *bool) {
	// convert into an expression list so we can re-use exprList formatting
	xlist := make([]ast.Expr, len(list))
	for i, x := range list {
		xlist[i] = x
	}
	mode := commaSep
	if !indent {
		mode |= noIndent
	}
	p.exprList(token.NoPos, xlist, 1, mode, multiLine, token.NoPos)
}
883480
func FormatStringList(list []string) (fields []interface{}) {
	fields = make([]interface{}, len(list))
	for i, v := range list {
		fields[i] = v
	}
	return
}
285488
func isMemoryMapSentinel(line string) bool {
	for _, s := range memoryMapSentinels {
		if strings.Contains(line, s) {
			return true
		}
	}
	return false
}
174944
func (w *Writer) WriteList(lst *list.List) {
	ptr := unsafe.Pointer(lst)
	typ := reflect.TypeOf(lst)
	if writeRef(w, ptr, typ) {
		return
	}
	setWriterRef(w, ptr, typ)
	count := lst.Len()
	if count == 0 {
		writeEmptyList(w)
		return
	}
	writeListHeader(w, count)
	for e := lst.Front(); e != nil; e = e.Next() {
		w.Serialize(e.Value)
	}
	writeListFooter(w)
}
912170
func (d *Dispenser) isNewLine() bool {
	if d.cursor < 1 {
		return true
	}
	if d.cursor > len(d.tokens)-1 {
		return false
	}
	return d.tokens[d.cursor-1].File != d.tokens[d.cursor].File ||
		d.tokens[d.cursor-1].Line+d.numLineBreaks(d.cursor-1) < d.tokens[d.cursor].Line
}
909160
func (opts Options) AsList() (ls []string) {
	for k, v := range opts {
		ls = append(ls, fmt.Sprintf("%s=%s", k, v))
	}
	return
}
375441
func (p *Proxy) checkEndpointList(ctx context.Context, e string) bool {
	if p.endpointBlackList == nil && p.endpointWhiteList == nil {
		return true
	}

	for _, rgx := range p.endpointBlackList {
		if rgx.MatchString(e) {
			return false
		}
	}

	return true
}
1004687
func IsPointWithinLineBounds(p, lineEndpoint1, lineEndpoint2 geom.Coord) bool {
	return internal.IsPointWithinLineBounds(p, lineEndpoint1, lineEndpoint2)
}
899122
func (pp *PP) ppList() []map[string]interface{} {
	pps := make([]map[string]interface{}, 0, len(pp.PostProcessors))
	for _, rawPP := range pp.PostProcessors {
		switch pp := rawPP.(type) {
		case string:
		case map[string]interface{}:
			pps = append(pps, pp)
		case []interface{}:
			for _, innerRawPP := range pp {
				if innerPP, ok := innerRawPP.(map[string]interface{}); ok {
					pps = append(pps, innerPP)
				}
			}
		}
	}
	return pps
}
39117
func IsSliceContainsStr(sl []string, str string) bool {
	str = strings.ToLower(str)
	for _, s := range sl {
		if strings.ToLower(s) == str {
			return true
		}
	}
	return false
}
520979
func isHeadline(data []byte) bool {
	if !charMatches(data[0], '*') {
		return false
	}
	level := 0
	for level < 6 && charMatches(data[level], '*') {
		level++
	}
	return charMatches(data[level], ' ')
}
226104
func (p *parser) parseStmtList() (list []ast.Stmt) {
	if p.trace {
		defer un(trace(p, "StatementList"))
	}

	for p.tok != token.CASE && p.tok != token.DEFAULT && p.tok != token.RBRACE && p.tok != token.EOF {
		list = append(list, p.parseStmt())
	}

	return
}
245147
func (c PublicClient) ListFull(patterns ...string) ([]payload.FullPayloadInfo, error) {
	var result params.PayloadListResults

	args := params.PayloadListArgs{
		Patterns: patterns,
	}
	if err := c.FacadeCall("List", &args, &result); err != nil {
		return nil, errors.Trace(err)
	}

	payloads := make([]payload.FullPayloadInfo, len(result.Results))
	for i, apiInfo := range result.Results {
		payload, err := api.API2Payload(apiInfo)
		if err != nil {
			// We should never see this happen; we control the input safely.
			return nil, errors.Trace(err)
		}
		payloads[i] = payload
	}
	return payloads, nil
}