Skip to content

kbgod/go-plur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-plur

A simple Go package to pluralize words.

This package using Generic types, so it requires Go 1.18 or later.

Installation

go get github.com/kbgod/go-plur

Usage

func main() {
	one := "яблоко"
	two := "яблока"
	many := "яблук"

	v := 112
	fmt.Println(plur.Text(v, one, two, many)) // яблук
	fmt.Println(plur.NumberText(v, one, two, many)) // 112 яблук
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages