Awesome
numd
Pluralize a word
- 1 dollar, 5 dollars
- 1 рубль, 2 рубля, 5 рублей
Install
go get github.com/andrepolischuk/numd-go
Usage
package main
import "github.com/andrepolischuk/numd-go"
func main() {
priceInRub := numd.Decline(24, "рубль", "рубля", "рублей") // 24 рубля
priceInUsd := numd.Decline(51, "dollar", "dollars") // 51 dollars
}
License
MIT