// Format returns a pretty printed tree
191638
func (f *Folder) Format(maxDepth int) string {
	return f.format("", true, maxDepth, 0)
}
1059429
func (node *IntervalExpr) Format(buf *TrackedBuffer) {
	buf.Myprintf("interval %v %s", node.Expr, node.Unit)
}
1217328
func (node *Where) Format(buf *TrackedBuffer) {
	if node == nil || node.Expr == nil {
		return
	}
	buf.Myprintf(" %s %v", node.Type, node.Expr)
}
763385
func (self *BufferingFormatter) Format(records []*LogRecord) string {
	var buf bytes.Buffer
	if len(records) > 0 {
		buf.WriteString(self.FormatHeader(records))
		for _, record := range records {
			buf.WriteString(self.lineFormatter.Format(record))
		}
		buf.WriteString(self.FormatFooter(records))
	}
	return buf.String()
}
1300312
func (ts TimeStamp) Format(f string) string {
	return ts.AsTime().Format(f)
}
397749
func (s *IndicesAnalyzeService) Format(format string) *IndicesAnalyzeService {
	s.format = format
	return s
}
890942
func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation {
	a.format = format
	return a
}
1253060
func (node *Union) Format(buf *TrackedBuffer) {
	buf.Myprintf("%v %s %v%v%v%s", node.Left, node.Type, node.Right,
		node.OrderBy, node.Limit, node.Lock)
}
450237
func (f JSONFormatter) Format(writer io.Writer, keyvals ...interface{}) error {
	n := len(keyvals)
	m := make(map[string]interface{})
	for i := 0; i < n; i += 2 {
		if i+1 >= n {
			break
		}

		k, ok := keyvals[i].(string)
		if !ok {
			return errors.New("Could not Marshal key-value pairs to JSON")
		}

		vg, ok := keyvals[i+1].(ValueGenerator)
		if ok {
			m[k] = vg()
		} else {
			m[k] = keyvals[i+1]
		}
	}

	buf := new(bytes.Buffer)
	enc := json.NewEncoder(buf)
	enc.SetEscapeHTML(false)
	if err := enc.Encode(m); err != nil {
		return err
	}

	outputString := fmt.Sprintf("%s", buf.Bytes())
	_, err := writer.Write([]byte(outputString))
	return err
}
1018183
func (node BoolVal) Format(buf *TrackedBuffer) {
	if node {
		buf.Myprintf("true")
	} else {
		buf.Myprintf("false")
	}
}
763526
func (node *TimestampFuncExpr) Format(buf *TrackedBuffer) {
	buf.Myprintf("%s(%s, %v, %v)", node.Name, node.Unit, node.Expr1, node.Expr2)
}
1239450
func (t TimeFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field) {
	fmt.Fprint(w, entry.Time.Format(t.Layout))
}
75214
func (d Date) Format(layout string) string {
	return d.t.Format(layout)
}
64231
func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation {
	a.format = format
	return a
}
1154124
func (e Error) Format(a ...interface{}) Error {
	e.Message = fmt.Sprintf(e.Message, a...)
	return e
}
690765
func (_ *NilFormatter) Format(_ string, _ LogLevel, _ int, _ ...interface{}) {
	// noop
}
1131373
func (q *RangeQuery) Format(format string) *RangeQuery {
	q.format = format
	return q
}