MCPcopy
hub / github.com/expr-lang/expr / NewFormatter

Method NewFormatter

internal/spew/config.go:240–242  ·  view source on GitHub ↗

* NewFormatter returns a custom formatter that satisfies the fmt.Formatter interface. As a result, it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatte

(v interface{})

Source from the content-addressed store, hash-verified

238c.Printf, c.Println, or c.Printf.
239*/
240func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
241 return newFormatter(c, v)
242}
243
244// Fdump formats and displays the passed arguments to io.Writer w. It formats
245// exactly the same as Dump.

Callers 1

TestSpewFunction · 0.80

Calls 1

newFormatterFunction · 0.85

Tested by 1

TestSpewFunction · 0.64