summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-08-10 00:29:54 +0200
committerGitHub <noreply@github.com>2020-08-10 00:29:54 +0200
commit4e50fd864921c556988c919269448efdb90fa961 (patch)
treea3625f03f8de3c4f3841364000a4ea3aa42c1533 /vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go
parentdfdffa0027334e55ce213fc6eb62206dbf48baf6 (diff)
downloadmatterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.gz
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.bz2
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.zip
Use mattermost v5 module (#1192)
Diffstat (limited to 'vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go')
-rw-r--r--vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go b/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go
deleted file mode 100644
index 1f3ea5c6..00000000
--- a/vendor/github.com/nicksnyder/go-i18n/i18n/language/plural.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package language
-
-import (
- "fmt"
-)
-
-// Plural represents a language pluralization form as defined here:
-// http://cldr.unicode.org/index/cldr-spec/plural-rules
-type Plural string
-
-// All defined plural categories.
-const (
- Invalid Plural = "invalid"
- Zero = "zero"
- One = "one"
- Two = "two"
- Few = "few"
- Many = "many"
- Other = "other"
-)
-
-// NewPlural returns src as a Plural
-// or Invalid and a non-nil error if src is not a valid Plural.
-func NewPlural(src string) (Plural, error) {
- switch src {
- case "zero":
- return Zero, nil
- case "one":
- return One, nil
- case "two":
- return Two, nil
- case "few":
- return Few, nil
- case "many":
- return Many, nil
- case "other":
- return Other, nil
- }
- return Invalid, fmt.Errorf("invalid plural category %s", src)
-}