mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-27 22:46:09 +00:00
Feature: Set tagging filters via a config file
This commit is contained in:
11
internal/tools/utils.go
Normal file
11
internal/tools/utils.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package tools
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Plural returns a singular or plural of a word together with the total
|
||||
func Plural(total int, singular, plural string) string {
|
||||
if total == 1 {
|
||||
return fmt.Sprintf("%d %s", total, singular)
|
||||
}
|
||||
return fmt.Sprintf("%d %s", total, plural)
|
||||
}
|
||||
Reference in New Issue
Block a user