diff options
| author | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 21:44:56 +0800 |
|---|---|---|
| committer | Quey-Liang Kao <s101062801@m101.nthu.edu.tw> | 2017-08-20 21:44:56 +0800 |
| commit | 7877f0735dab782f66af157b39d6de3539c97102 (patch) | |
| tree | ddb228b1c8154a4ccee0b6438da5c0bcd7eda7b5 /todolist/util.go | |
| parent | e1ed1a2357bbf5083e96c883071339235ac0f02e (diff) | |
| parent | 620a9f3aff090063f79285fb20437a62ce089a4e (diff) | |
Merge github.com:gammons/todolist into note_patch_set
Diffstat (limited to 'todolist/util.go')
| -rw-r--r-- | todolist/util.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/todolist/util.go b/todolist/util.go index 34f9dd1..ff3dbba 100644 --- a/todolist/util.go +++ b/todolist/util.go @@ -52,3 +52,10 @@ func getNearestMonday(t time.Time) time.Time { } } } + +func pluralize(count int, singular, plural string) string { + if count > 1 { + return plural + } + return singular +} |
