aboutsummaryrefslogtreecommitdiff
path: root/cmp/report_text.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-08-01 23:37:55 +0200
committerJoe Tsai <joetsai@digital-static.net>2019-08-01 14:37:55 -0700
commit6d8cafd2f64fe3cd66b7530d95df066b00bdd777 (patch)
tree6f4fc42ed92094d521d9a962b2e23b60dd5dab14 /cmp/report_text.go
parent00cb0dc383d0b3bc6ef9b8be55dc8c11f7d2f20a (diff)
downloadgo-cmp-6d8cafd2f64fe3cd66b7530d95df066b00bdd777.tar.gz
Simplify code (#149)
- No need to wrap ToUpper & Fields - Simpler concatenation - Easier pointer access
Diffstat (limited to 'cmp/report_text.go')
-rw-r--r--cmp/report_text.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmp/report_text.go b/cmp/report_text.go
index 0353b50..8b8fcab 100644
--- a/cmp/report_text.go
+++ b/cmp/report_text.go
@@ -365,7 +365,7 @@ func (s diffStats) String() string {
// Pluralize the name (adjusting for some obscure English grammar rules).
name := s.Name
if sum > 1 {
- name = name + "s"
+ name += "s"
if strings.HasSuffix(name, "ys") {
name = name[:len(name)-2] + "ies" // e.g., "entrys" => "entries"
}