{"modulePath":"github.com/docker/compose-cli","version":"v1.0.7","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package formatter\n\n## Constants\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) 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 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## Types\n\n```go\ntype MemBytes int64\n```\nMemBytes is a type for human readable memory bytes (like 128M, 2g, etc)\n\n```go\nfunc (m *MemBytes) Set(value string) error\n```\nSet sets the value of the MemBytes by passing a string\n\n```go\nfunc (m *MemBytes) String() string\n```\nString returns the string format of the human readable memory bytes\n\n```go\nfunc (m *MemBytes) Type() string\n```\nType returns the type\n\n```go\nfunc (m *MemBytes) Value() int64\n```\nValue returns the value in int64\n\n","path":"github.com/docker/compose-cli/formatter","name":"formatter","synopsis":"","isRedistributable":true}
