inflect

package
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Singular = rules.Singularize
View Source
var Tableize = inflect.Tableize
View Source
var TemplateFunctions = template.FuncMap{
	"lower":               strings.ToLower,
	"upper":               strings.ToUpper,
	"pascal":              Pascal,
	"plural":              Plural,
	"singular":            rules.Singularize,
	"snake":               Snake,
	"join":                strings.Join,
	"camel":               Camel,
	"firstWordUpperCamel": firstWordUpperCamel,
	"firstWordLowerCamel": firstWordLowerCamel,
	"sub":                 sub,
	"add":                 add,
	"addStr":              addStr,

	"goType":          goType,
	"goChangeSetType": goChangeSetType,
	"goKeywordFix":    goKeywordFix,
	"goModelType":     goModelType,
	"goReceiver":      GoReceiver,

	"tsType":          tsType,
	"tsChangeSetType": tsChangeSetType,
}

Functions

func Camel added in v0.2.0

func Camel(s string) string

func GoReceiver added in v0.2.0

func GoReceiver(typ string) string

type abbreviation used for a method's receiver variable https://github.com/golang/go/wiki/CodeReviewComments#receiver-names

func Pascal

func Pascal(s string) string

func Plural added in v0.2.0

func Plural(name string) string

func Snake

func Snake(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL