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

[Bug] go swagger null pointer error | swagger 空指针错误 #274

Open
suyuan32 opened this issue Mar 14, 2024 · 1 comment
Open

[Bug] go swagger null pointer error | swagger 空指针错误 #274

suyuan32 opened this issue Mar 14, 2024 · 1 comment

Comments

@suyuan32
Copy link
Owner

由于 go swagger 依赖版本过低,若使用 go 1.22 版本安装会报以下错误

image

swagger generate spec --output=./fms.json --scan-models
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa1283e]

goroutine 206 [running]:
go/types.(*Checker).handleBailout(0xc00148cc00, 0xc0014e9bd0)
        /home/ryan/software/go/src/go/types/check.go:367 +0x88

解决方法:

go install github.com/go-swagger/go-swagger/cmd/swagger@db51e79

@LiaoSirui
Copy link

非常好用 !lgfm

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