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

goctl model mysql datasource 生成 Model 代码多引用依赖问题 #3825

Closed
calvinit opened this issue Jan 3, 2024 · 2 comments
Closed

Comments

@calvinit
Copy link

calvinit commented Jan 3, 2024

Describe the bug

如果不生成带缓存的代码,xxx_model_gen.go 不应该 import 进来 "github.com/zeromicro/go-zero/core/stores/sqlc" 依赖!

To Reproduce

  1. The code is

    goctl model mysql datasource --url 'xxx' -t '*' --style go_zero -d model
  2. The error is

    Error: Unused import "github.com/zeromicro/go-zero/core/stores/sqlc"
    

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

Screenshots
If applicable, add screenshots to help explain your problem.

Environments (please complete the following information):

  • OS: MacOS Sonoma 14.2.1
  • go-zero version 1.6.1
  • goctl version 1.6.1 darwin/amd64
kesonan added a commit to kesonan/go-zero that referenced this issue Jan 4, 2024
@kesonan
Copy link
Collaborator

kesonan commented Jan 4, 2024

This will be fixed on pr #3828

kevwan pushed a commit to kesonan/go-zero that referenced this issue Jan 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 6, 2024
dongmeng199 pushed a commit to dongmeng199/go-zero that referenced this issue Jan 9, 2024
@kevwan
Copy link
Contributor

kevwan commented Jan 13, 2024

Fixed, closing. Reopen if further problem. Thanks!

@kevwan kevwan closed this as completed Jan 13, 2024
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

3 participants