cmp/report_text.go
func (s *textList) AppendEllipsis(ds diffStats) {
	hasStats := ds != diffStats{}
	if len(*s) == 0 || !(*s)[len(*s)-1].Value.Equal(textEllipsis) {
		if hasStats {
			*s = append(*s, textRecord{Value: textEllipsis, Comment: ds})
		} else {
			*s = append(*s, textRecord{Value: textEllipsis})
		}
		return
	}
	if hasStats {
		(*s)[len(*s)-1].Comment = (*s)[len(*s)-1].Comment.(diffStats).Append(ds)
	}
}
func (s *textList) AppendEllipsis(ds diffStats) {
	hasStats := ds != diffStats{}
	if len(*s) == 0 || !(*s)[len(*s)-1].Value.Equal(textEllipsis) {
		if hasStats {
			*s = append(*s, textRecord{Value: textEllipsis, Comment: ds})
		} else {
			*s = append(*s, textRecord{Value: textEllipsis})
		}
		return
	}
	if hasStats {
		(*s)[len(*s)-1].Comment = (*s)[len(*s)-1].Comment.(diffStats).Append(ds)
	}
}
func ( s * textList ) AppendEllipsis ( ds diffStats ) { hasStats := ds != diffStats { } if len ( * s ) == 0 || ! ( * s ) [ len ( * s ) - 1 ] . Value . Equal ( textEllipsis ) { if hasStats { * s = append ( * s , textRecord { Value : textEllipsis , Comment : ds } ) } else { * s = append ( * s , textRecord { Value : textEllipsis } ) } return } if hasStats { ( * s ) [ len ( * s ) - 1 ] . Comment = ( * s ) [ len ( * s ) - 1 ] . Comment . ( diffStats ) . Append ( ds ) } }
// AppendEllipsis appends a new ellipsis node to the list if none already
// exists at the end. If cs is non-zero it coalesces the statistics with the
// previous diffStats.
AppendEllipsis appends a new ellipsis node to the list if none already exists at the end . If cs is non - zero it coalesces the statistics with the previous diffStats .