Inflector pluralizes and singularizes English nouns.
Documentation: http://godoc.org/github.com/gedex/inflector
There are only two exported functions: Pluralize
and Singularize
.
s := "People"
fmt.Println(inflector.Singularize(s)) // will print "Person"
s2 := "octopus"
fmt.Println(inflector.Pluralize(s2)) // will print "octopuses"
Please see example/example.go for a complete example.
This library is distributed under the BSD-style license found in the LICENSE.md file.