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

use go work report swaggerFiles could not import error #272

Open
cyxr001 opened this issue Jun 9, 2023 · 0 comments
Open

use go work report swaggerFiles could not import error #272

cyxr001 opened this issue Jun 9, 2023 · 0 comments

Comments

@cyxr001
Copy link

cyxr001 commented Jun 9, 2023

We have a monorepo, and some of module import github.com/swaggo/gin-swagger v1.2.0
the project layout like this:

- repo
     - project-b
         - xxx
     - project-a
         - package-a
         - package-b
         - go.mod
         - go.sum 
- go.work
- go.work.sum

package-a import
import :

import "github.com/swaggo/gin-swagger/swaggerFiles"

package-a go mod:

require (
github.com/swaggo/gin-swagger v1.2.0
....
)

go work: use ./project-a

the vscode report : could not import github.com/swaggo/gin-swagger/swaggerFiles (no required module provides package "github.com/swaggo/gin-swagger/swaggerFiles")

once I remove the go.work and go.work.sum, it won't report this error

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

1 participant