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

Check if specific type name has a valid syntax #72

Open
alexey-sveshnikov opened this issue May 12, 2021 · 0 comments
Open

Check if specific type name has a valid syntax #72

alexey-sveshnikov opened this issue May 12, 2021 · 0 comments

Comments

@alexey-sveshnikov
Copy link

Hi!

Looks like I misunderstood the concepts of genny and passed a specific type with a package name as genny arguments. The problem is that an error message is not pointed to the cause directly it's not trivial to debug. Actually, I resorted to binary search to figure it out.

Code:

//go:generate genny -pkg=test -in=../templates/main.go -out=main.go gen "MyType=package.SpecificType"

Error:

Failed to goimports the generated code: ../templates/main.go:10:12: expected type, found '.' (and 1 more errors)
main.go:3: running "genny": exit status 4
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