{"modulePath":"github.com/docker/compose-cli","version":"v1.0.17","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package formatter\n\n## Constants\n\n```go\nconst (\n\t// Never use ANSI codes\n\tNever = \"never\"\n\n\t// Always use ANSI codes\n\tAlways = \"always\"\n\n\t// Auto detect terminal is a tty and can use ANSI codes\n\tAuto = \"auto\"\n)\n```\n\n```go\nconst (\n\t// JSON is the constant for Json formats on list commands\n\tJSON = \"json\"\n\t// TemplateLegacyJSON the legacy json formatting value using go template\n\tTemplateLegacyJSON = \"{{json.}}\"\n\t// PRETTY is the constant for default formats on list commands\n\tPRETTY = \"pretty\"\n)\n```\n\n## Functions\n\n```go\nfunc NewLogConsumer(ctx context.Context, w io.Writer, color bool, prefix bool) compose.LogConsumer\n```\nNewLogConsumer creates a new LogConsumer\n\n```go\nfunc Print(toJSON interface{}, format string, outWriter io.Writer, writerFn func(w io.Writer), headers ...string) error\n```\nPrint prints formatted lists in different formats\n\n```go\nfunc PrintPrettySection(out io.Writer, printer func(writer io.Writer), headers ...string) error\n```\nPrintPrettySection prints a tabbed section on the writer parameter\n\n```go\nfunc SetANSIMode(ansi string)\n```\nSetANSIMode configure formatter for colored output on ANSI-compliant console\n\n```go\nfunc SetMultiErrorFormat(errs *multierror.Error)\n```\nSetMultiErrorFormat set cli default format for multi-errors\n\n```go\nfunc ToJSON(i interface{}, prefix string, indentation string) (string, error)\n```\nToJSON return a string with the JSON representation of the interface{}\n\n```go\nfunc ToStandardJSON(i interface{}) (string, error)\n```\nToStandardJSON return a string with the JSON representation of the interface{}\n\n","path":"github.com/docker/compose-cli/cli/formatter","name":"formatter","synopsis":"","isRedistributable":true}
