// Format returns a representation of typedData, which can be easily displayed by a user-interface
// without in-depth knowledge about 712 rules
550077
func (typedData *TypedData) Format() []*NameValueType {
	var nvts []*NameValueType
	nvts = append(nvts, &NameValueType{
		Name:  "EIP712Domain",
		Value: typedData.formatData("EIP712Domain", typedData.Domain.Map()),
		Typ:   "domain",
	})
	nvts = append(nvts, &NameValueType{
		Name:  typedData.PrimaryType,
		Value: typedData.formatData(typedData.PrimaryType, typedData.Message),
		Typ:   "primary type",
	})
	return nvts
}
1299178
func (c *ConstraintDefinition) Format(buf *TrackedBuffer) {
	if c.Name != "" {
		buf.Myprintf("constraint %s ", c.Name)
	}
	c.Details.Format(buf)
}
1347188
func (f *PoliteJSONFormatter) Format(calldepth int, r *logging.Record, w io.Writer) error {
	entry := make(map[string]interface{})
	entry["id"] = r.Id
	entry["level"] = r.Level
	entry["time"] = r.Time
	entry["module"] = r.Module
	entry["message"] = r.Message()
	err := json.NewEncoder(w).Encode(entry)
	if err != nil {
		return err
	}

	w.Write([]byte{'\n'})
	return nil
}
75214
func (d Date) Format(layout string) string {
	return d.t.Format(layout)
}
1131373
func (q *RangeQuery) Format(format string) *RangeQuery {
	q.format = format
	return q
}
319340
func format(name string) string {
	return fmt.Sprintf("%v%v", strings.ToLower(name[0:1]), name[1:])
}
967243
func (a *CompositeAggregationDateHistogramValuesSource) Format(format string) *CompositeAggregationDateHistogramValuesSource {
	a.format = format
	return a
}
479713
func formatData(value interface{}) (formatted interface{}) {
	switch value := value.(type) {
	case json.Marshaler:
		return value
	case error:
		return value.Error()
	case fmt.Stringer:
		return value.String()
	default:
		return value
	}
}
1269924
func (s StringFormatter) Format(w io.Writer, entry zapcore.Entry, fields []zapcore.Field) {
	fmt.Fprintf(w, "%s", s.Value)
}
874183
func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation {
	a.format = format
	return a
}
519450
func (ra *RA) Format(f fmt.State, c rune) {
	s := &state{
		State: f,
		verb:  c,
		// pmod in case ra.RA was directly set to something out of range
		hrDeg:  unit.PMod(ra.Hour(), 24),
		caller: fsRA,
		sym:    ra.Sym,
	}
	ra.Err = s.writeFormatted()
}
98532
func (timeCache *timeFormatCacheType) Format() []byte {
	timeCache.lock.RLock()
	defer timeCache.lock.RUnlock()

	return timeCache.format
}
1164114
func (node *ConvertExpr) Format(buf *TrackedBuffer) {
	buf.Myprintf("convert(%v, %v)", node.Expr, node.Type)
}
1175310
func (m Map) Format() []string {
	res := make([]string, 0, len(m))
	for k, values := range m {
		for _, v := range values {
			res = append(res, Format(k, v))
		}
	}
	sort.Strings(res)
	return res
}
1300312
func (ts TimeStamp) Format(f string) string {
	return ts.AsTime().Format(f)
}
198908
func (node *When) Format(buf *TrackedBuffer) {
	buf.Myprintf("when %v then %v", node.Cond, node.Val)
}
1154124
func (e Error) Format(a ...interface{}) Error {
	e.Message = fmt.Sprintf(e.Message, a...)
	return e
}