aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dustin/go-humanize/ordinals.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dustin/go-humanize/ordinals.go')
-rw-r--r--vendor/github.com/dustin/go-humanize/ordinals.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go
deleted file mode 100644
index 43d88a86..00000000
--- a/vendor/github.com/dustin/go-humanize/ordinals.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package humanize
-
-import "strconv"
-
-// Ordinal gives you the input number in a rank/ordinal format.
-//
-// Ordinal(3) -> 3rd
-func Ordinal(x int) string {
- suffix := "th"
- switch x % 10 {
- case 1:
- if x%100 != 11 {
- suffix = "st"
- }
- case 2:
- if x%100 != 12 {
- suffix = "nd"
- }
- case 3:
- if x%100 != 13 {
- suffix = "rd"
- }
- }
- return strconv.Itoa(x) + suffix
-}