-
Notifications
You must be signed in to change notification settings - Fork 7
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 the source directory for code #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be better to just call out to go list
in cases like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it makes sense to use the API/stdlib over calling out to executables to tell us the presence of files.
Unless there is a reason that this could fail when go list
would succeed @Jacalz ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standardised tooling might have some benefits because we don't need to maintain our own solution but yeah, I realise now that it is better to just use the stdlib for this case. I just have a comment inline to make sure that we terminate early to avoid walking the whole file path.
… another test file to make debugging easier
This addresses the confusing output mentioned in: #44
Making sure the source directory contains code seems like an easy way to prevent this from being confusing.