go-zero
go-zero copied to clipboard
goctl generate code duplicate in import part
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior, if applicable:
-
The code is
import ( "net/http" "book/service/user/api/internal/logic" "book/service/user/api/internal/svc" "book/service/user/api/internal/types" "github.com/zeromicro/go-zero/rest/httpx" "github.com/zeromicro/go-zero/rest/httpx" )
-
The error is
"github.com/zeromicro/go-zero/rest/httpx" // duplicate
Expected behavior no duplicated import
Screenshots If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
- OS: [mac os 11.5.2]
- go-zero version [ 1.3.5]
- goctl version [1.3.5, optional]
- may be other version is still with this question
More description Just do like :https://go-zero.dev/cn/docs/quick-start/micro-service It will appear in /internal/handler
Fixed in v1.4.0