// formatList takes a set of strings and formats them into properly
// aligned output, replacing any blank fields with a placeholder
// for awk-ability.
493911
func formatList(in []string) string {
	columnConf := columnize.DefaultConfig()
	columnConf.Empty = "<none>"
	return columnize.Format(in, columnConf)
}
602207
func List(name rune, helpvalue ...string) *[]string {
	return CommandLine.List(name, helpvalue...)
}
198429
func generateListStorageOutput(ctx *cmd.Context, api StorageListAPI) (map[string]StorageInfo, error) {
	results, err := api.ListStorageDetails()
	if err != nil {
		return nil, errors.Trace(err)
	}
	if len(results) == 0 {
		return nil, nil
	}
	return formatStorageDetails(results)
}
303261
func Formats() []Format {
	list := make([]Format, 0, len(formatsByName))
	for _, f := range formatsByName {
		list = append(list, *f)
	}
	return list
}
1290739
func formatMap(m map[string]string) string {
	var l string
	for key, value := range m {
		l += key + "=" + fmt.Sprintf("%q", value) + "\n"
	}
	return l
}
1251280
func (s *exampleLister) List(selector labels.Selector) (ret []*v1.Example, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.Example))
	})
	return ret, err
}
111516
func (inputSet StringSet) ToList() []string {
	returnList := make([]string, 0, len(inputSet))
	for key, _ := range inputSet {
		returnList = append(returnList, key)
	}
	return returnList
}
900801
func (b *SampleJSONBuilder) ConvertList(orig []*Sample) (SampleJSONList, error) {
	if orig == nil {
		return nil, nil
	}

	list := make(SampleJSONList, len(orig))
	for idx, or := range orig {
		json, err := b.Convert(or)
		if err != nil {
			return nil, err
		}
		list[idx] = json
	}

	return list, nil
}
545122
func ReadList(r *bufio.Reader) Value {
	ReadWhitespace(r)
	if !ReadListStart(r) {
		return nil
	}
	result := ReadListItem(r)
	if !ReadListEnd(r) {
		return nil
	}
	return result
}
1150123
func (r *Record) List(args ...string) (list []*Info, err error) {
	switch len(args) {
	case 0:
		_, err = r.Get(r.uri("/records"), &list)
	case 1:
		_, err = r.Get(r.uri("/records/%s", args...), &list)
	case 2:
		_, err = r.Get(r.uri("/records/%s/%s", args...), &list)
	default:
		err = r.formatCallError("List", args...)
	}
	return
}
386468
func (s String) List() []string {
	res := make(sortableSliceOfString, 0, len(s))
	for key := range s {
		res = append(res, key)
	}
	sort.Sort(res)
	return []string(res)
}
1330184
func printEventList(list *api.EventList, w io.Writer, withNamespace bool, wide bool, showAll bool, columnLabels []string) error {
	sort.Sort(SortableEvents(list.Items))
	for i := range list.Items {
		if err := printEvent(&list.Items[i], w, withNamespace, wide, showAll, columnLabels); err != nil {
			return err
		}
	}
	return nil
}
244236
func StringList(v ...Stringable) *StringListExpr {
	rv := &StringListExpr{Literal: []*StringExpr{}}
	for _, item := range v {
		rv.Literal = append(rv.Literal, item.String())
	}
	return rv
}
41289
func ioOutputFormatField(field string) func(*LineData, *bytes.Buffer) error {
	return func(ld *LineData, b *bytes.Buffer) error {
		v, exist := ld.Fields[field]
		if !exist {
			return nil
		}
		_, err := b.WriteString(fmt.Sprintf("%v", v))
		return err
	}
}
1601
func formatFields(fields logrus.Fields) []string {
	var results []string

	for k, v := range fields {
		value, ok := v.(string)
		if !ok {
			// convert non-string value into a string
			value = fmt.Sprint(v)
		}

		results = append(results, fmt.Sprintf("%s=%q", k, value))
	}

	return results
}
756571
func FormatMap(m map[string]string) (fmtStr string) {
	// output with keys in sorted order to provide stable output
	keys := sets.NewString()
	for key := range m {
		keys.Insert(key)
	}
	for _, key := range keys.List() {
		fmtStr += fmt.Sprintf("%v=%q\n", key, m[key])
	}
	fmtStr = strings.TrimSuffix(fmtStr, "\n")

	return
}
734565
func formatLF(s string) string {
	return strings.Replace(strings.Replace(s, crlf, lf, -1), cr, lf, -1)
}