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

Fix struct validation for multiple files #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikeschinkel
Copy link

Using the following command line where persister contains files generated by sqlc, your latest commit in master fails to correctly generate the file ./app/query.iface.go because it cannot find the struct Queries in the first .go file.

ifacemaker -f ./persister/*.go -s Queries -i DataStoreQueries -p app -o ./app/query.iface.go

I moved the if !validateStructType(...) {...} to after the for loop and passed allDeclaredTypes instead of types and it allowed the file to be generated. I believe this is all that is needed for a fix.

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

Successfully merging this pull request may close these issues.

1 participant