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

warning: failed to get package name in dir: ./, error: execute go list command, exit status 1, stdout:, stderr:no Go files in #1811

Open
sarkis1231 opened this issue May 22, 2024 · 3 comments

Comments

@sarkis1231
Copy link

sarkis1231 commented May 22, 2024

Getting this warning "warning: failed to get package name in dir: ./, error: execute go list command, exit status 1, stdout:, stderr:no Go files in go-lang/swagger-chi".
But my folder structure looks good and the command is correct I have tried to downgrade go version to 1.22.0
the warning disappeared

Expected behavior
I expect to not see the warning

Screenshots
Screenshot 2024-05-23 at 2 57 54 AM

Your swag version
e.g. 1.16.3

Your go version
e.g. 1.22.1

Desktop (please complete the following information):

  • OS: iOS
  • Browser: [e.g. chrome, safari]
  • Version: Sonoma 14.5
@pot-code
Copy link

pot-code commented Jun 3, 2024

so i added the -q flag to supress logs

@bobsongplus
Copy link
Contributor

If you don't specify the directory, swag will search the current directory. I think the behavior is correct and the message is a warning that doesn't affect swag generation.

@sarkis1231
Copy link
Author

-q

swag init -g cmd/server.go --outputTypes go,yaml
I have specified

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

3 participants