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

I got an error when swag init --parseDependency --parseInternal #1312

Closed
HeinKoZin opened this issue Aug 28, 2022 · 2 comments
Closed

I got an error when swag init --parseDependency --parseInternal #1312

HeinKoZin opened this issue Aug 28, 2022 · 2 comments

Comments

@HeinKoZin
Copy link

Describe the bug
When I run swag init --parseDependency --parseInternal

I got an error like this:
`2022/08/28 14:02:52 Generate swagger docs....
2022/08/28 14:02:52 Generate general API Info, search dir:./
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0x104f1e8]

goroutine 1 [running]:
github.com/swaggo/swag.(*PackagesDefinitions).parseFunctionScopedTypesFromFile(0xc0000947f8, 0xc000656b00, {0xc000306508, 0x4}, 0xc00b110e10)`

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
Swag will generate docs

Your swag version
e.g. 1.8.5

Your go version
e.g. 1.19.0

@ghost
Copy link

ghost commented Aug 28, 2022

How you fix it?

@ubogdan
Copy link
Contributor

ubogdan commented Aug 28, 2022

duplicate #1309

@sankalpbohra please downgrade to 1.8.4 or build swag from source.

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

2 participants