You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Got error: "panic: runtime error: invalid memory address or nil pointer dereference" when i execute the script:
"swag init -d ./ -g router.go", the error trace is as follow:
Describe the bug
Got error: "panic: runtime error: invalid memory address or nil pointer dereference" when i execute the script:
"swag init -d ./ -g router.go", the error trace is as follow:
goroutine 1 [running]:
github.com/swaggo/swag.getFuncDoc({0x100951dc0?, 0x140007a3c70?})
/Users/jway/Desktop/Dev/swag/parser.go:1062 +0x88
github.com/swaggo/swag.getFuncDoc({0x100951fc0?, 0x140007a9f00?})
/Users/jway/Desktop/Dev/swag/parser.go:1055 +0x138
github.com/swaggo/swag.(*Parser).ParseRouterAPIInfo(0x14000000ea0, 0x140007cef40)
/Users/jway/Desktop/Dev/swag/parser.go:1088 +0xbc
github.com/swaggo/swag.(*PackagesDefinitions).RangeFiles(0x140001b9350, 0x14001ceb488)
/Users/jway/Desktop/Dev/swag/packages.go:107 +0x2cc
github.com/swaggo/swag.(*Parser).ParseAPIMultiSearchDir(0x14000000ea0, {0x140001f63e0, 0x1, 0x0?}, {0x16fa7f753, 0xd}, 0x64)
/Users/jway/Desktop/Dev/swag/parser.go:457 +0x4a4
github.com/swaggo/swag/gen.(*Gen).Build(0x140001b9170, 0x140001f8000)
/Users/jway/Desktop/Dev/swag/gen/gen.go:221 +0x6a8
main.initAction(0x14000160420?)
/Users/jway/Desktop/Dev/swag/cmd/swag/main.go:243 +0x914
github.com/urfave/cli/v2.(*Command).Run(0x14000160420, 0x14000039d00, {0x140001cc370, 0x5, 0x5})
/Users/jway/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:276 +0x754
github.com/urfave/cli/v2.(*Command).Run(0x14000160840, 0x14000039bc0, {0x140000201e0, 0x6, 0x6})
/Users/jway/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:269 +0x964
github.com/urfave/cli/v2.(*App).RunContext(0x140001a6400, {0x1009cf058?, 0x100d50c80}, {0x140000201e0, 0x6, 0x6})
/Users/jway/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:333 +0x53c
github.com/urfave/cli/v2.(*App).Run(...)
/Users/jway/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:307
main.main()
/Users/jway/Desktop/Dev/swag/cmd/swag/main.go:333 +0x614
make: *** [swagger] Error 2
Your swag version
e.g. 1.16.4
Your go version
e.g. 1.21.12
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: