Skip to content

Stringer

Package stringer providers some util functions for strings.

CamelToSnake

stringer.CamelToSnake("GoTestExample")
// returns go_test_example

SnakeToCamel

stringer.CamelToSnake("go_test_example")
// returns GoTestExample

Singular

stringer.Singular("users")
// returns user

Plural

stringer.Plural("user")
// returns users