pluralizer

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inflector

type Inflector struct {
	mock.Mock
}

Inflector is an autogenerated mock type for the Inflector type

func NewInflector

func NewInflector(t interface {
	mock.TestingT
	Cleanup(func())
}) *Inflector

NewInflector creates a new instance of Inflector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Inflector) EXPECT

func (_m *Inflector) EXPECT() *Inflector_Expecter

func (*Inflector) Language

func (_m *Inflector) Language() pluralizer.Language

Language provides a mock function with no fields

func (*Inflector) Plural

func (_m *Inflector) Plural(word string) string

Plural provides a mock function with given fields: word

func (*Inflector) SetLanguage

func (_m *Inflector) SetLanguage(language pluralizer.Language) pluralizer.Inflector

SetLanguage provides a mock function with given fields: language

func (*Inflector) Singular

func (_m *Inflector) Singular(word string) string

Singular provides a mock function with given fields: word

type Inflector_Expecter

type Inflector_Expecter struct {
	// contains filtered or unexported fields
}

func (*Inflector_Expecter) Language

Language is a helper method to define mock.On call

func (*Inflector_Expecter) Plural

func (_e *Inflector_Expecter) Plural(word interface{}) *Inflector_Plural_Call

Plural is a helper method to define mock.On call

  • word string

func (*Inflector_Expecter) SetLanguage

func (_e *Inflector_Expecter) SetLanguage(language interface{}) *Inflector_SetLanguage_Call

SetLanguage is a helper method to define mock.On call

  • language pluralizer.Language

func (*Inflector_Expecter) Singular

func (_e *Inflector_Expecter) Singular(word interface{}) *Inflector_Singular_Call

Singular is a helper method to define mock.On call

  • word string

type Inflector_Language_Call

type Inflector_Language_Call struct {
	*mock.Call
}

Inflector_Language_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Language'

func (*Inflector_Language_Call) Return

func (*Inflector_Language_Call) Run

func (_c *Inflector_Language_Call) Run(run func()) *Inflector_Language_Call

func (*Inflector_Language_Call) RunAndReturn

type Inflector_Plural_Call

type Inflector_Plural_Call struct {
	*mock.Call
}

Inflector_Plural_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Plural'

func (*Inflector_Plural_Call) Return

func (*Inflector_Plural_Call) Run

func (_c *Inflector_Plural_Call) Run(run func(word string)) *Inflector_Plural_Call

func (*Inflector_Plural_Call) RunAndReturn

func (_c *Inflector_Plural_Call) RunAndReturn(run func(string) string) *Inflector_Plural_Call

type Inflector_SetLanguage_Call

type Inflector_SetLanguage_Call struct {
	*mock.Call
}

Inflector_SetLanguage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLanguage'

func (*Inflector_SetLanguage_Call) Return

func (*Inflector_SetLanguage_Call) Run

func (*Inflector_SetLanguage_Call) RunAndReturn

type Inflector_Singular_Call

type Inflector_Singular_Call struct {
	*mock.Call
}

Inflector_Singular_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Singular'

func (*Inflector_Singular_Call) Return

func (*Inflector_Singular_Call) Run

func (_c *Inflector_Singular_Call) Run(run func(word string)) *Inflector_Singular_Call

func (*Inflector_Singular_Call) RunAndReturn

func (_c *Inflector_Singular_Call) RunAndReturn(run func(string) string) *Inflector_Singular_Call

type Language

type Language struct {
	mock.Mock
}

Language is an autogenerated mock type for the Language type

func NewLanguage

func NewLanguage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Language

NewLanguage creates a new instance of Language. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Language) EXPECT

func (_m *Language) EXPECT() *Language_Expecter

func (*Language) Name

func (_m *Language) Name() string

Name provides a mock function with no fields

func (*Language) PluralRuleset

func (_m *Language) PluralRuleset() pluralizer.Ruleset

PluralRuleset provides a mock function with no fields

func (*Language) SingularRuleset

func (_m *Language) SingularRuleset() pluralizer.Ruleset

SingularRuleset provides a mock function with no fields

type Language_Expecter

type Language_Expecter struct {
	// contains filtered or unexported fields
}

func (*Language_Expecter) Name

Name is a helper method to define mock.On call

func (*Language_Expecter) PluralRuleset

func (_e *Language_Expecter) PluralRuleset() *Language_PluralRuleset_Call

PluralRuleset is a helper method to define mock.On call

func (*Language_Expecter) SingularRuleset

func (_e *Language_Expecter) SingularRuleset() *Language_SingularRuleset_Call

SingularRuleset is a helper method to define mock.On call

type Language_Name_Call

type Language_Name_Call struct {
	*mock.Call
}

Language_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'

func (*Language_Name_Call) Return

func (_c *Language_Name_Call) Return(_a0 string) *Language_Name_Call

func (*Language_Name_Call) Run

func (_c *Language_Name_Call) Run(run func()) *Language_Name_Call

func (*Language_Name_Call) RunAndReturn

func (_c *Language_Name_Call) RunAndReturn(run func() string) *Language_Name_Call

type Language_PluralRuleset_Call

type Language_PluralRuleset_Call struct {
	*mock.Call
}

Language_PluralRuleset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PluralRuleset'

func (*Language_PluralRuleset_Call) Return

func (*Language_PluralRuleset_Call) Run

func (*Language_PluralRuleset_Call) RunAndReturn

type Language_SingularRuleset_Call

type Language_SingularRuleset_Call struct {
	*mock.Call
}

Language_SingularRuleset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SingularRuleset'

func (*Language_SingularRuleset_Call) Return

func (*Language_SingularRuleset_Call) Run

func (*Language_SingularRuleset_Call) RunAndReturn

type Pattern

type Pattern struct {
	mock.Mock
}

Pattern is an autogenerated mock type for the Pattern type

func NewPattern

func NewPattern(t interface {
	mock.TestingT
	Cleanup(func())
}) *Pattern

NewPattern creates a new instance of Pattern. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Pattern) EXPECT

func (_m *Pattern) EXPECT() *Pattern_Expecter

func (*Pattern) Matches

func (_m *Pattern) Matches(word string) bool

Matches provides a mock function with given fields: word

type Pattern_Expecter

type Pattern_Expecter struct {
	// contains filtered or unexported fields
}

func (*Pattern_Expecter) Matches

func (_e *Pattern_Expecter) Matches(word interface{}) *Pattern_Matches_Call

Matches is a helper method to define mock.On call

  • word string

type Pattern_Matches_Call

type Pattern_Matches_Call struct {
	*mock.Call
}

Pattern_Matches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Matches'

func (*Pattern_Matches_Call) Return

func (*Pattern_Matches_Call) Run

func (_c *Pattern_Matches_Call) Run(run func(word string)) *Pattern_Matches_Call

func (*Pattern_Matches_Call) RunAndReturn

func (_c *Pattern_Matches_Call) RunAndReturn(run func(string) bool) *Pattern_Matches_Call

type Ruleset

type Ruleset struct {
	mock.Mock
}

Ruleset is an autogenerated mock type for the Ruleset type

func NewRuleset

func NewRuleset(t interface {
	mock.TestingT
	Cleanup(func())
}) *Ruleset

NewRuleset creates a new instance of Ruleset. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Ruleset) AddIrregular

func (_m *Ruleset) AddIrregular(substitutions ...pluralizer.Substitution) pluralizer.Ruleset

AddIrregular provides a mock function with given fields: substitutions

func (*Ruleset) AddUninflected

func (_m *Ruleset) AddUninflected(words ...string) pluralizer.Ruleset

AddUninflected provides a mock function with given fields: words

func (*Ruleset) EXPECT

func (_m *Ruleset) EXPECT() *Ruleset_Expecter

func (*Ruleset) Irregular

func (_m *Ruleset) Irregular() pluralizer.Substitutions

Irregular provides a mock function with no fields

func (*Ruleset) Regular

func (_m *Ruleset) Regular() pluralizer.Transformations

Regular provides a mock function with no fields

func (*Ruleset) Uninflected

func (_m *Ruleset) Uninflected() pluralizer.Patterns

Uninflected provides a mock function with no fields

type Ruleset_AddIrregular_Call

type Ruleset_AddIrregular_Call struct {
	*mock.Call
}

Ruleset_AddIrregular_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddIrregular'

func (*Ruleset_AddIrregular_Call) Return

func (*Ruleset_AddIrregular_Call) Run

func (_c *Ruleset_AddIrregular_Call) Run(run func(substitutions ...pluralizer.Substitution)) *Ruleset_AddIrregular_Call

func (*Ruleset_AddIrregular_Call) RunAndReturn

type Ruleset_AddUninflected_Call

type Ruleset_AddUninflected_Call struct {
	*mock.Call
}

Ruleset_AddUninflected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddUninflected'

func (*Ruleset_AddUninflected_Call) Return

func (*Ruleset_AddUninflected_Call) Run

func (_c *Ruleset_AddUninflected_Call) Run(run func(words ...string)) *Ruleset_AddUninflected_Call

func (*Ruleset_AddUninflected_Call) RunAndReturn

type Ruleset_Expecter

type Ruleset_Expecter struct {
	// contains filtered or unexported fields
}

func (*Ruleset_Expecter) AddIrregular

func (_e *Ruleset_Expecter) AddIrregular(substitutions ...interface{}) *Ruleset_AddIrregular_Call

AddIrregular is a helper method to define mock.On call

  • substitutions ...pluralizer.Substitution

func (*Ruleset_Expecter) AddUninflected

func (_e *Ruleset_Expecter) AddUninflected(words ...interface{}) *Ruleset_AddUninflected_Call

AddUninflected is a helper method to define mock.On call

  • words ...string

func (*Ruleset_Expecter) Irregular

func (_e *Ruleset_Expecter) Irregular() *Ruleset_Irregular_Call

Irregular is a helper method to define mock.On call

func (*Ruleset_Expecter) Regular

func (_e *Ruleset_Expecter) Regular() *Ruleset_Regular_Call

Regular is a helper method to define mock.On call

func (*Ruleset_Expecter) Uninflected

func (_e *Ruleset_Expecter) Uninflected() *Ruleset_Uninflected_Call

Uninflected is a helper method to define mock.On call

type Ruleset_Irregular_Call

type Ruleset_Irregular_Call struct {
	*mock.Call
}

Ruleset_Irregular_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Irregular'

func (*Ruleset_Irregular_Call) Return

func (*Ruleset_Irregular_Call) Run

func (_c *Ruleset_Irregular_Call) Run(run func()) *Ruleset_Irregular_Call

func (*Ruleset_Irregular_Call) RunAndReturn

type Ruleset_Regular_Call

type Ruleset_Regular_Call struct {
	*mock.Call
}

Ruleset_Regular_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Regular'

func (*Ruleset_Regular_Call) Return

func (*Ruleset_Regular_Call) Run

func (_c *Ruleset_Regular_Call) Run(run func()) *Ruleset_Regular_Call

func (*Ruleset_Regular_Call) RunAndReturn

type Ruleset_Uninflected_Call

type Ruleset_Uninflected_Call struct {
	*mock.Call
}

Ruleset_Uninflected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninflected'

func (*Ruleset_Uninflected_Call) Return

func (*Ruleset_Uninflected_Call) Run

func (*Ruleset_Uninflected_Call) RunAndReturn

type Substitution

type Substitution struct {
	mock.Mock
}

Substitution is an autogenerated mock type for the Substitution type

func NewSubstitution

func NewSubstitution(t interface {
	mock.TestingT
	Cleanup(func())
}) *Substitution

NewSubstitution creates a new instance of Substitution. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Substitution) EXPECT

func (_m *Substitution) EXPECT() *Substitution_Expecter

func (*Substitution) From

func (_m *Substitution) From() string

From provides a mock function with no fields

func (*Substitution) To

func (_m *Substitution) To() string

To provides a mock function with no fields

type Substitution_Expecter

type Substitution_Expecter struct {
	// contains filtered or unexported fields
}

func (*Substitution_Expecter) From

From is a helper method to define mock.On call

func (*Substitution_Expecter) To

To is a helper method to define mock.On call

type Substitution_From_Call

type Substitution_From_Call struct {
	*mock.Call
}

Substitution_From_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'From'

func (*Substitution_From_Call) Return

func (*Substitution_From_Call) Run

func (_c *Substitution_From_Call) Run(run func()) *Substitution_From_Call

func (*Substitution_From_Call) RunAndReturn

func (_c *Substitution_From_Call) RunAndReturn(run func() string) *Substitution_From_Call

type Substitution_To_Call

type Substitution_To_Call struct {
	*mock.Call
}

Substitution_To_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'To'

func (*Substitution_To_Call) Return

func (*Substitution_To_Call) Run

func (_c *Substitution_To_Call) Run(run func()) *Substitution_To_Call

func (*Substitution_To_Call) RunAndReturn

func (_c *Substitution_To_Call) RunAndReturn(run func() string) *Substitution_To_Call

type Transformation

type Transformation struct {
	mock.Mock
}

Transformation is an autogenerated mock type for the Transformation type

func NewTransformation

func NewTransformation(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transformation

NewTransformation creates a new instance of Transformation. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Transformation) Apply

func (_m *Transformation) Apply(word string) string

Apply provides a mock function with given fields: word

func (*Transformation) EXPECT

type Transformation_Apply_Call

type Transformation_Apply_Call struct {
	*mock.Call
}

Transformation_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'

func (*Transformation_Apply_Call) Return

func (*Transformation_Apply_Call) Run

func (*Transformation_Apply_Call) RunAndReturn

type Transformation_Expecter

type Transformation_Expecter struct {
	// contains filtered or unexported fields
}

func (*Transformation_Expecter) Apply

func (_e *Transformation_Expecter) Apply(word interface{}) *Transformation_Apply_Call

Apply is a helper method to define mock.On call

  • word string

Jump to

Keyboard shortcuts

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