// Format implements Format interface.
3622
func (f *flatFormatter) Format(format string, args ...interface{}) (n int, errno error) {
	return (*indentFormatter)(f).format(true, format, args...)
}
690765
func (_ *NilFormatter) Format(_ string, _ LogLevel, _ int, _ ...interface{}) {
	// noop
}
144116
func (d Digits) Format(in int32) string {
	f := fmt.Sprintf("%%0%dd", d)
	return fmt.Sprintf(f, in)
}
1333982
func (t *ConsoleFormatter) Format(errin error) (errtext string, err error) {
	return t.FormatSkip(errin, 1)
}
1222501
func (f *Formatter) Format(data []byte) ([]byte, error) {
	var v interface{}
	if err := json.Unmarshal(data, &v); err != nil {
		return nil, err
	}

	return []byte(f.pretty(v, 1)), nil
}
433607
func (sf *StdFormatter) Format(e *Entry) ([]byte, error) {

	// Initialize if not set
	if sf.HeaderColor == nil {
		sf.mu.Lock()
		sf.HeaderColor = colorLabels
		sf.mu.Unlock()
	}

	// Initialize if not set
	if sf.HeaderPlain == nil {
		sf.mu.Lock()
		sf.HeaderPlain = plainLabels
		sf.mu.Unlock()
	}

	// Normal headers.  time, file, etc
	var header, message []byte
	sf.stdHeader(&header, e.Time, e.Prefix, e.File, e.Line)

	// Level headers
	headers := sf.levelHeaders()
	message = append(headers[e.Level], append(header, e.Message...)...)

	if e.Fields != nil {
		sf.stdFields(&message, e.Fields, e.Level)
	}

	return append(message, '\n'), nil
}
740778
func (d *API) Formats() strfmt.Registry {
	if d.formats == nil {
		d.formats = strfmt.NewFormats()
	}
	return d.formats
}
1021899
func (c Calendar) Format(datetime time.Time, pattern string) (string, error) {
	parsed, err := c.parseDateTimeFormat(pattern)
	if err != nil {
		return "", err
	}

	return c.formatDateTime(datetime, parsed)
}
98532
func (timeCache *timeFormatCacheType) Format() []byte {
	timeCache.lock.RLock()
	defer timeCache.lock.RUnlock()

	return timeCache.format
}
1102262
func Format(v Value, c *FormatConfig, w io.Writer) error {
	if c == nil {
		c = &FormatConfig{} // keep this empty, zero values for options should mean default format.
	}
	_, err := w.Write([]byte(v.format("", c)))
	return err
}
1187911
func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation {
	a.format = format
	return a
}
1014257
func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation {
	a.format = format
	return a
}
258651
func (st LString) Format(f fmt.State, c rune) {
	switch c {
	case 'd', 'i':
		if nm, err := parseNumber(string(st)); err != nil {
			defaultFormat(nm, f, 'd')
		} else {
			defaultFormat(string(st), f, 's')
		}
	default:
		defaultFormat(string(st), f, c)
	}
}
224980
func Format(platform specs.Platform) string {
	if platform.OS == "" {
		return "unknown"
	}

	return joinNotEmpty(platform.OS, platform.Architecture, platform.Variant)
}
816204
func format(s string, codes interface{}) string {
	var seq string

	switch v := codes.(type) {

	case string:
		seq = v
	case []int:
		seq = makeSequence(v)
	default:
		return s
	}

	if len(seq) == 0 {
		return s
	}
	return startFormat(seq) + s + stopFormat()
}
149057
func (m *MultiFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field) {
	m.mutex.RLock()
	for i := range m.formatters {
		m.formatters[i].Format(w, entry, fields)
	}
	m.mutex.RUnlock()
}
259730
func Format(ts *timestamp.Timestamp, layout string) string {
	return Time(ts).Format(layout)
}