Comments (6)
1 , hi,建议使用https://github.com/TarsCloud/TarsGo/blob/master/docs/tars_go_quickstart.md 文档,里面有说明create_tars_server.sh , -outdir 指定的是要放文件的根目录, 我们通常指定的是项目目录下的vendor,参照我们的makefile。
from tarsgo.
2和3 我没太明白你说的意思,麻烦可以的话,微信详细和您了解下,微信号sandyskies
from tarsgo.
package main
import (
"github.com/TarsCloud/TarsGo/tars"
"TestApp"
)
func main() { //Init servant
imp := new(SayHelloImp) //New Imp
app := new(TestApp.SayHello) //New init the A JCE
cfg := tars.GetServerConfig() //Get Config File Object
app.AddServant(imp, cfg.App+"."+cfg.Server+".SayHelloObj") //Register Servant
tars.Run()
}
这是服务端helloworld的例子,没明白你说的路径命名,我们都是通过vendor来解决的
from tarsgo.
@sandyskies 我个人并不觉得生成的*_IF.go应当放在vendor中,vendor一般是指第三方依赖,而*_IF.go则确实属于该项目的重要组成部分。另外,纵观golang项目import路径,很少发现有项目以大驼峰的形式来命名,TestApp/HelloGo这种路径还是很不大众的。
from tarsgo.
@duguying 你说的驼峰问题,可以讨论下。 vendor的话,可以不放,但import 就必须相对路径
from tarsgo.
@sandyskies 可是它生成的IF文件的路径自动的带上了 TestApp\HelloGo
这就挺烦的了, 我不希望生成的IF文件放在项目的根目录,我希望放置在我指定的目录,方便我随时删除重新生成。建议参考一下 protobuf 的生成工具
from tarsgo.
Related Issues (20)
- tars2go编译报错”go fmt fail“ HOT 1
- protoc-gen-go-tarsrpc生成的rpc接口,参数和返回值,为何没有设置为结构的指针? HOT 4
- 客户端暴露一些常用的对外接口 HOT 2
- tarscpp client: version not correct
- Fix code scanning alert - Disabled TLS certificate check
- Support opentelemetry
- Support prometheus reporting indicators HOT 1
- Support polarismesh
- pb2tarsgo工具从pb2tarsgo变成protoc-gen-go-tarsrpc导致service与func名格式变化 HOT 3
- 重启服务存在多个进程问题 HOT 3
- Remove deprecated code
- 设置 GODEBUG=gctrace=1, 但在日志文件中没有看到gc日志 HOT 5
- 关于 gin 的使用 HOT 3
- TarsPython And TarsRust HOT 1
- "Code generated by .*" comment should appear before package clause
- 对于 optional 字段,可以有一个缺省值,缺省值在编码时默认不打包
- make 编译出错 HOT 3
- 这个项目还有在维护吗?examples里的样例大部分都编译不了 HOT 2
- tarsgo是否考虑支持自定义的标签? HOT 1
- How to solve the problem that the frame keeps reporting errors under win10? 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 tarsgo.