Skip to content

v3: Implicit firstUpper for private interfaces #1136

@avorima

Description

@avorima

Generating mocks for an unexported interface in v3 using

type myInterface interface {
        Something() error
}
dir: "{{.InterfaceDir}}"
pkgname: "{{.SrcPackageName}}"
structname: "{{.Mock}}{{.InterfaceName}}"
filename: "mock_{{.InterfaceName | snakecase}}_test.go"

yields this mock mockmyInterface, but it would be nice if it could be mockMyInterface without having to use {{.InterfaceName | firstUpper }}.
I might be imagining things, but I think this used to be the behavior in one of the previous mockery versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions