code: func awayFromTTY(format string) PostProcessor {
  	return func(input *bytes.Buffer, output io.Writer, ui plugin.UI) error {
  		if output == os.Stdout && ui.IsTerminal() {
  			tempFile, err := tempfile.New("", "profile", "."+format)
  			if err != nil {
  				return err
  			}
  			ui.PrintErr("Generating report in ", tempFile.Name())
  			_, err = fmt.Fprint(tempFile, input)
  			return err
  		}
  		_, err := fmt.Fprint(output, input)
  		return err
  	}
  }
docs: // awayFromTTY saves the output in a file if it would otherwise go to
  // the terminal screen. This is used to avoid dumping binary data on
  // the screen.