Documentation ¶ Index ¶ func Print(w io.Writer, format Format, data any) error type Format Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Print ¶ func Print(w io.Writer, format Format, data any) error Print writes data to w in the specified format. For FormatHuman, data is printed using fmt.Fprintf with %+v. For FormatJSON, encoding/json with indentation is used. For FormatYAML, gopkg.in/yaml.v3 is used. Types ¶ type Format ¶ type Format string Format represents an output format. const ( FormatHuman Format = "human" FormatJSON Format = "json" FormatYAML Format = "yaml" ) Source Files ¶ View all Source files formatter.go Click to show internal directories. Click to hide internal directories.