kops/vendor/github.com/gobuffalo/flect
Peter Rifel 6ed48c1349 Update controller-tools vendoring 2020-04-08 15:20:27 -05:00
..
.gitignore Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
.gometalinter.json Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
BUILD.bazel Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
LICENSE Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
Makefile Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
README.md Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
SHOULDERS.md Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
acronyms.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
azure-pipelines.yml Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
azure-tests.yml Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
camelize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
capitalize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
custom_data.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
dasherize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
flect.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
go.mod Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
go.sum Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
humanize.go Update controller-tools vendoring 2020-04-08 15:20:27 -05:00
ident.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
lower_upper.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
ordinalize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
pascalize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
plural_rules.go Update controller-tools vendoring 2020-04-08 15:20:27 -05:00
pluralize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
rule.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
singular_rules.go Update controller-tools vendoring 2020-04-08 15:20:27 -05:00
singularize.go Update controller-tools vendoring 2020-04-08 15:20:27 -05:00
titleize.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
underscore.go Add vendoring of controller-tools 2019-10-01 17:24:31 -05:00
version.go Update controller-tools vendoring 2020-04-08 15:20:27 -05:00

README.md

Flect

GoDoc CI Go Report Card

This is a new inflection engine to replace https://github.com/markbates/inflect designed to be more modular, more readable, and easier to fix issues on than the original.

Installation

$ go get -u -v github.com/gobuffalo/flect

github.com/gobuffalo/flect

GoDoc

The github.com/gobuffalo/flect package contains "basic" inflection tools, like pluralization, singularization, etc...

The Ident Type

In addition to helpful methods that take in a string and return a string, there is an Ident type that can be used to create new, custom, inflection rules.

The Ident type contains two fields.

  • Original - This is the original string that was used to create the Ident
  • Parts - This is a []string that represents all of the "parts" of the string, that have been split apart, making the segments easier to work with

Examples of creating new inflection rules using Ident can be found in the github.com/gobuffalo/flect/name package.

github.com/gobuffalo/flect/name

GoDoc

The github.com/gobuffalo/flect/name package contains more "business" inflection rules like creating proper names, table names, etc...