diff --git a/go.mod b/go.mod index 22dd494e..b8afdfc2 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/chigopher/pathlib v0.19.1 github.com/davecgh/go-spew v1.1.1 github.com/huandu/xstrings v1.4.0 - github.com/iancoleman/strcase v0.2.0 github.com/jinzhu/copier v0.3.5 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/mapstructure v1.5.0 diff --git a/go.sum b/go.sum index ffdbb4b5..1f05cd87 100644 --- a/go.sum +++ b/go.sum @@ -130,8 +130,6 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= diff --git a/go.work.sum b/go.work.sum index 69fece70..8901db9b 100644 --- a/go.work.sum +++ b/go.work.sum @@ -969,7 +969,6 @@ github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= diff --git a/pkg/outputter.go b/pkg/outputter.go index 53567756..89c9b91d 100644 --- a/pkg/outputter.go +++ b/pkg/outputter.go @@ -15,7 +15,6 @@ import ( "github.com/chigopher/pathlib" "github.com/huandu/xstrings" - "github.com/iancoleman/strcase" "github.com/rs/zerolog" "github.com/vektra/mockery/v2/pkg/config" @@ -229,9 +228,9 @@ func parseConfigTemplates(ctx context.Context, c *config.Config, iface *Interfac InterfaceName: iface.Name, // Deprecated: All custom case variables of InterfaceName will be removed in the next major version // Use the template functions instead - InterfaceNameCamel: strcase.ToCamel(iface.Name), - InterfaceNameLowerCamel: strcase.ToLowerCamel(iface.Name), - InterfaceNameSnake: strcase.ToSnake(iface.Name), + InterfaceNameCamel: xstrings.ToCamelCase(iface.Name), + InterfaceNameLowerCamel: xstrings.FirstRuneToLower(xstrings.ToCamelCase(iface.Name)), + InterfaceNameSnake: xstrings.ToSnakeCase(iface.Name), InterfaceNameLower: strings.ToLower(iface.Name), Mock: mock, MockName: c.MockName,