func (c *Output) Write(ctx *Context, value interface{}) (err error) {
	formatterName := c.formatter.name
	formatter := c.formatter.formatters[formatterName]
	// If the formatter is not one of the default ones, add a new line at the end.
	// This keeps consistent behaviour with the current code.
	var newline bool
	if _, found := DefaultFormatters[formatterName]; !found {
		newline = true
	}
	if err := c.writeFormatter(ctx, formatter, value, newline); err != nil {
		return err
	}
	return nil
}
// Write formats and outputs the value as directed by the --format and
// --output command line flags.
Write formats and outputs the value as directed by the --format and
output command line flags.
// Write formats and outputs the value as directed by the -- format and // -- output command line flags .
func (c *Output) Write(ctx *Context, value interface{}) (err error) {
	formatterName := c.formatter.name
	formatter := c.formatter.formatters[formatterName]
	var newline bool
	if _, found := DefaultFormatters[formatterName]; !found {
		newline = true
	}
	if err := c.writeFormatter(ctx, formatter, value, newline); err != nil {
		return err
	}
	return nil
}
func ( c * Output ) Write ( ctx * Context , value interface { } ) ( err error ) { formatterName := c . formatter . name formatter := c . formatter . formatters [ formatterName ] var newline bool if _ , found := DefaultFormatters [ formatterName ] ; ! found { newline = true } if err := c . writeFormatter ( ctx , formatter , value , newline ) ; err != nil { return err } return nil }
Write formats and outputs the value as directed by the --format and
output command line flags.
Write formats and outputs the value as directed by the -- format and output command line flags .
// If the formatter is not one of the default ones, add a new line at the end. // This keeps consistent behaviour with the current code.