swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

swag init displayed two unexplained warnings #1815

Closed godcong closed 1 month ago

godcong commented 2 months ago

Describe the bug A clear and concise description of what the bug is.

2024/05/28 17:38:37 warning: failed to evaluate const magic at \pkg\mod\github.com\xo\terminfo@v0.0.0-20220910002029-abceb7e1c41e\dec.go:11:2, strconv.ParseUint: parsing "o432": invalid syntax
2024/05/28 17:38:37 warning: failed to evaluate const magicExtended at \pkg\mod\github.com\xo\terminfo@v0.0.0-20220910002029-abceb7e1c41e\dec.go:14:2, strconv.ParseUint: parsing "o1036": invalid syntax

To Reproduce Steps to reproduce the behavior:

  1. swag init --parseDependency --generalInfo ./main.go --output ./docs

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Your swag version swag.exe version v1.16.3

Your go version go1.22.3

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

sdghchj commented 1 month ago

swag will evaluate all consts in order to evaluate enums.

godcong commented 1 month ago

@sdghchj What causes this problem? Do I need to fix it? I don't know where this is used...

sdghchj commented 1 month ago

No need. Just ignore it.

godcong commented 1 month ago

@sdghchj Thanks