We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug 写idl文件,执行cwgo,报错,BaseResponse不存在
To Reproduce cwgo client --type HTTP --idl idl/frontend/collect.proto --server_name collect --module github.com/qingyggg/mols_core syntax = "proto3"; common文件: syntax = "proto3"; package frontend.common; option go_package = "frontend/common";
cwgo client --type HTTP --idl idl/frontend/collect.proto --server_name collect --module github.com/qingyggg/mols_core
syntax = "proto3"; common文件:
message BaseResponse{ int32 statusCode = 1; string statusMsg = 2; } `
collect文件: `package frontend.collect; option go_package = "frontend/interact/collect";
import "api.proto"; import "common.proto";
message CollectActionRequest { string AHashId=1[(api.go_tag)='json:"aHashId,required"']; //文章的id string Tag=2[(api.go_tag)='json:"tag,required"']; int32 ActionType = 3[(api.go_tag)='json:"action_type,required"',(api.vd)='$==1 || $==2']; // 1-collect, 2-Uncollect }
service CollectHandler { rpc CollectAction(CollectActionRequest) returns(BaseResponse) { option (api.post) = "/blog_server/collect/action"; } }`
Expected behavior idl正确生成kitex和hertz代码
Screenshots
Kitex version: cwgo version v0.1.2
Environment:
The output of go env. GO111MODULE='on' GOARCH='amd64' GOBIN='' GOCACHE='/home/wen/.cache/go-build' GOENV='/home/wen/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/home/wen/.gvm/pkgsets/go1.22/global/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/home/wen/.gvm/pkgsets/go1.22/global' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/home/wen/.gvm/gos/go1.22' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/home/wen/.gvm/gos/go1.22/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.22.0' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/home/wen/workspace/qingyggg/mols_core/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1792806341=/tmp/go-build -gno-record-gcc-switches'
go env
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
写idl文件,执行cwgo,报错,BaseResponse不存在
To Reproduce
cwgo client --type HTTP --idl idl/frontend/collect.proto --server_name collect --module github.com/qingyggg/mols_core
syntax = "proto3"; common文件:
syntax = "proto3";package frontend.common;
option go_package = "frontend/common";
message BaseResponse{
int32 statusCode = 1;
string statusMsg = 2;
}
`
collect文件:
`package frontend.collect;
option go_package = "frontend/interact/collect";
import "api.proto";
import "common.proto";
message CollectActionRequest {
string AHashId=1[(api.go_tag)='json:"aHashId,required"']; //文章的id
string Tag=2[(api.go_tag)='json:"tag,required"'];
int32 ActionType = 3[(api.go_tag)='json:"action_type,required"',(api.vd)='$==1 || $==2']; // 1-collect, 2-Uncollect
}
service CollectHandler {
rpc CollectAction(CollectActionRequest) returns(BaseResponse) {
option (api.post) = "/blog_server/collect/action";
}
}`
Expected behavior
idl正确生成kitex和hertz代码
Screenshots
Kitex version:
cwgo version v0.1.2
Environment:
The output of
go env
.GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/wen/.cache/go-build'
GOENV='/home/wen/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/wen/.gvm/pkgsets/go1.22/global/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/wen/.gvm/pkgsets/go1.22/global'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/wen/.gvm/gos/go1.22'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/wen/.gvm/gos/go1.22/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/wen/workspace/qingyggg/mols_core/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1792806341=/tmp/go-build -gno-record-gcc-switches'
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: