Skip to content

andrepolischuk/numd-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

numd Build Status

Pluralize a word

Docs

  • 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