diff options
author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/github.com/dustin/go-humanize/ordinals.go | |
parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip |
Delete vendor directory
Diffstat (limited to 'vendor/github.com/dustin/go-humanize/ordinals.go')
-rw-r--r-- | vendor/github.com/dustin/go-humanize/ordinals.go | 25 |
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 43d88a8..0000000 --- a/vendor/github.com/dustin/go-humanize/ordinals.go +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | package humanize | ||
2 | |||
3 | import "strconv" | ||
4 | |||
5 | // Ordinal gives you the input number in a rank/ordinal format. | ||
6 | // | ||
7 | // Ordinal(3) -> 3rd | ||
8 | func Ordinal(x int) string { | ||
9 | suffix := "th" | ||
10 | switch x % 10 { | ||
11 | case 1: | ||
12 | if x%100 != 11 { | ||
13 | suffix = "st" | ||
14 | } | ||
15 | case 2: | ||
16 | if x%100 != 12 { | ||
17 | suffix = "nd" | ||
18 | } | ||
19 | case 3: | ||
20 | if x%100 != 13 { | ||
21 | suffix = "rd" | ||
22 | } | ||
23 | } | ||
24 | return strconv.Itoa(x) + suffix | ||
25 | } | ||