{"modulePath":"github.com/devigned/pub","version":"v0.3.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package format\n\n## Types\n\n```go\ntype OutputType string\n```\nOutputType represents the type of output, JSON, XML, TSV, etc.\n\n```go\nvar (\n\t// JSONFormat tell the printer to print json\n\tJSONFormat OutputType = \"json\"\n)\n```\n\n```go\ntype Printable interface {\n\tPrint(writer io.Writer, format OutputType) error\n}\n```\nPrintable is an object that can format itself\n\n```go\ntype Printer interface {\n\tPrint(obj interface{}) error\n\tErrPrintf(format string, args ...interface{})\n}\n```\nPrinter prints objects\n\n```go\ntype StdPrinter struct {\n\tFormat OutputType\n}\n```\nStdPrinter is a printer that prints to os.Stdout\n\n```go\nfunc (StdPrinter) ErrPrintf(format string, args ...interface{})\n```\nErrPrintf will print a formatted string to os.Stderr\n\n```go\nfunc (stdPrinter StdPrinter) Print(obj interface{}) error\n```\nPrint prints an object to os.Stdout\n\n","path":"github.com/devigned/pub/pkg/format","name":"format","synopsis":"","isRedistributable":true}
