Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generation fails when interfaces are declared in a type block. #259

Open
ramirais opened this issue Sep 29, 2023 · 0 comments
Open

generation fails when interfaces are declared in a type block. #259

ramirais opened this issue Sep 29, 2023 · 0 comments

Comments

@ramirais
Copy link

I am trying using counterfeiter and had something as follow in the code

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate

type (
  //counterfeiter:generate . interface1
  interface1 interface {
    method1(x string) error
  }

  //counterfeiter:generate . interface2
  interface2 interface {
    method2(x string) error
  }
)

then when running go generate ./... nothing get generated.
if i change the code to the following, is this intended?

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate

  //counterfeiter:generate . interface1
  type interface1 interface {
    method1(x string) error
  }

  //counterfeiter:generate . interface2
  type interface2 interface {
    method2(x string) error
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant