Writer is an interface that any type can implement to write supported formats
| 90 | |
| 91 | // Writer is an interface that any type can implement to write supported formats |
| 92 | type Writer interface { |
| 93 | // WriteTable will write tabular output into the given io.Writer, returning |
| 94 | // an error if any occur |
| 95 | WriteTable(out io.Writer) error |
| 96 | // WriteJSON will write JSON formatted output into the given io.Writer, |
| 97 | // returning an error if any occur |
| 98 | WriteJSON(out io.Writer) error |
| 99 | // WriteYAML will write YAML formatted output into the given io.Writer, |
| 100 | // returning an error if any occur |
| 101 | WriteYAML(out io.Writer) error |
| 102 | } |
| 103 | |
| 104 | // EncodeJSON is a helper function to decorate any error message with a bit more |
| 105 | // context and avoid writing the same code over and over for printers. |
no outgoing calls
no test coverage detected
searching dependent graphs…