Comments (3)
没能复现你提到的情况,有可能是IDE或者编辑器导致的,可以在关闭IDE/编辑器后,在命令行重新走一遍流程,看能否复现。
from kitex.
根据kitex-develop/docs/guide/getting_started_cn.md文档,快速搭建hello例子,按照这个文档步骤,操作
新方法分别定义一个新的请求和响应,
AddRequest和
AddResponse,并在
service Hello中增加
add方法:
在运行的时候报异常handler.go:20:2: package kitex-examples/hello/kitex_gen/api is not in GOROOT (/root/go/src/kitex-examples/hello/kitex_gen/api)
经对比初始例子,发现kitex生成的新handler.go中多了一条引入包的import代码,如下图:需要升级kitex框架,升级完后,重新执行kitex命令导出接口文件,handler.go中不再有
api "kitex-examples/hello/kitex_gen/api"
升级执行以下命令: $ go get github.com/cloudwego/kitex $ go mod tidy需要调整getting_started_cn.md文档里面的步骤,提前执行以上这两条命令
他们文档是没写清楚。不过我知道两个方式可以跑起来了,晚点整理好给你看
from kitex.
Problem solved, this issue will be closed.
from kitex.
Related Issues (20)
- 在arm架构下无法编译 HOT 2
- proposal: SkipDecoder for thrift codec HOT 2
- The "example_shop" case uses proto instead of thrift as the IDL (Interface Definition Language), and after integrating with etcd as the service registry, errors occurred while running the code.
- example_shop 案例使用proto替代thirft作为idl语言,最后接入etcd后运行代码报错 HOT 4
- Compilation Error: "undefined: serviceinfo.WithStreamingMode"
- 升级kitex后,自动生成的kitex_gen代码有错误 HOT 1
- Compilation Error: "expected pseudo-register; found R13"
- Add `-gen-path` support for protobuf HOT 3
- kitex将下层的错误加上了remote or network error[remote]: biz error: 前缀,我该如何在上层获取原始返回的err呢 HOT 4
- possible to support tls? HOT 3
- [Error] HERTZ: [Recovery] err=remote or network error: get connection error: dial tcp 127.0.0.1:8888: i/o timeout HOT 2
- Compilation Error: "does not contain package github.com/cloudwego/iasm/x86_64"
- Feature Proposal: UnknownMethodHandler for KitexThrift/KitexProtobuf requests HOT 3
- Feature Proposal: tracing.ServerMiddleware 同时支持 metainfo 和 metadata 协议读取 HOT 2
- Feature Proposal: Allow custom registry to get the actual address for registering HOT 2
- Feature Proposal: optionloader for Kitex client/server HOT 4
- Feature Proposal: kitexcall command for sending json generic requests HOT 4
- 客户端访问服务出现 cannot assign requested address HOT 5
- kitex自定义脚手架模板里想获得hello.thrift里namespace怎么获得 HOT 4
- kitex会考虑和wego一样模版内置sprig函数吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitex.