code: func (c DiffCmd) formatDiff(diffs []diffmatchpatch.Diff, color bool) string {
  	var buff bytes.Buffer
  
  	for _, diff := range diffs {
  		text := diff.Text
  
  		switch diff.Type {
  		case diffmatchpatch.DiffInsert:
  			if color {
  				_, _ = buff.WriteString("\x1b[32m")
  			}
  			_, _ = buff.WriteString(DiffLineStart.ReplaceAllString(text, "$1+ $2"))
  			if color {
  				_, _ = buff.WriteString("\x1b[0m")
  			}
  		case diffmatchpatch.DiffDelete:
  			if color {
  				_, _ = buff.WriteString("\x1b[31m")
  			}
  			_, _ = buff.WriteString(DiffLineStart.ReplaceAllString(text, "$1- $2"))
  			if color {
  				_, _ = buff.WriteString("\x1b[0m")
  			}
  		case diffmatchpatch.DiffEqual:
  			_, _ = buff.WriteString(DiffLineStart.ReplaceAllString(text, "$1  $2"))
  		}
  	}
  
  	return buff.String()
  }
docs: // Formats the supplied Diff as a unified-diff-like text with infinite context and optionally colorizes it.