Protobuf 文件生成工具 Prototool 命令详解
Protobuf 文件生成工具 Prototool 命令详解
简介
Prototool 是 Protobuf 文件的生成工具, 目前支持go, php, java, c#, object c 五种语言包的生成.
详情参考Github: https://github.com/uber/prototool
docker 方式使用 prototool 工具
- 使用方式
// prototool 的使用
docker run --rm -v $(pwd):/work "uber/prototool" prototool
// 格式化 proto 文件
docker run --rm -v $(pwd):/work "uber/prototool" prototool format -l proto
// 编译, 格式化, 覆盖 proto 文件
docker run --rm -v $(pwd):/work "uber/prototool" prototool all proto
docker方式创建proto文件
docker run --rm -v $(pwd):/work "uber/prototool" prototool create test.proto
Prototool 部分命令参数简单介绍
prototool lint [目录]
递归的查找所有后缀为 .proto 的文件, 但是不包括 prototool.yaml 和 prototool.json 文件.
prototool lint testdir
注: 不设置目录, 则默认为当前目录. eg: prototool lint .
prototool create [test.proto]
创建一个 proto 的模板文件
$ prototool create test.proto
prototool files [目录]
列出要被使用的所有 proto 文件
$ prototool files testdir
prototool compile [目录]
编译目录下所有的 proto 文件
$ prototool compile testdir
prototool generate [目录]
生成 stubs 文件
$ prototool generate testdir
prototool帮助文档
查看帮助文档, 这里详细介绍了命令的使用方式.
$ prototool -h
Protobuf 文件生成工具 Prototool 命令详解的更多相关文章
- Linux文件排序工具 sort 命令详解
sort是排序工具,它完美贯彻了Unix哲学:"只做一件事,并做到完美".它的排序功能极强.极完整,只要文件中的数据足够规则,它几乎可以排出所有想要的排序结果,是一个非常优质的工具 ...
- [转] - JAR文件包及jar命令详解 ( MANIFEST.MF的用法 )
常常在网上看到有人询问:如何把 java 程序编译成 .exe 文件.通常回答只有两种,一种是制作一个可执行的 JAR 文件包,然后就可以像. chm 文档一样双击运行了:而另一种是使用 JET 来进 ...
- 以二进制的形式查看文件 Linux之od命令详解
od命令 以二进制的形式查看文件 od -t x1 /usr/local/FT/config/hsm_create.utf8.sql ef bb bf 4c 5f 0d 0a 5f 4e 4e 4f ...
- Linux性能分析工具top命令详解
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,常用于服务端性能分析. top命令说明 [www.linuxidc.com@linuxidc-t-tomcat-1 ...
- Android日志监听工具logcat命令详解(转)
Android日志系统提供了记录和查看系统调试信息的功能.日志都是从各种软件和一些系统的缓冲区中记录下来的,缓冲区可以通过logcat命令来查看和使用. 在使用logcat之前,请确保手机的USB调试 ...
- mysql的导入导出工具mysqldump命令详解
导出要用到MySQL的mysqldump工具,基本用法是: shell> mysqldump [OPTIONS] database [tables] 如果你不给定任何表,整个数据库将被导出. 通 ...
- Linux抓包工具tcpdump命令详解
1.简介 用简单的话来定义tcpdump,就是:dump the traffic on a network,根据使用者的定义对网络上的数据包进行截获的包分析工具. tcpdump可以将网络中 ...
- DOS 命令批量删除文件及相关批处理命令详解
del X:\*.* /f /s /q /a 递归强制静默删除X盘及其所有子目录下的所有文件 /f 表示强制删除文件 /s表示子目录都要删除该文件 /q表示无声,不提示 /a根据属性选择要删除的文件 ...
- Linux下的压缩zip,解压缩unzip命令详解及实例
实例:压缩服务器上当前目录的内容为xxx.zip文件 zip -r xxx.zip ./* 解压zip文件到当前目录 unzip filename.zip ====================== ...
随机推荐
- 关于EasyRTSPClient、EasyPlayer RTSP流重连问题的解释
EasyPlayer.EasyRTSPClient是如何设计重连的 首先大概解释一下EasyRTSPClient与EasyPlayer间的关系:EasyRTSPClient是一个专门用于与RTSP流媒 ...
- EasyNVR如何实现跨域鉴权
EasyNVR提供简单的登录鉴权,客户端通过用户名密码登录成功后,服务端返回认证token的cookie, 后续的接口访问, 服务端从cookie读取token进行校验. 但是, 在与客户系统集成时, ...
- 操作符表示指针指向的底层值 切片 nill 清空 按值引用赋值 获取地址赋值
package main import "fmt" var thisVisitedUrls [] string func tf() { p := &thisVisitedU ...
- CentOS7的/tmp目录自动清理规则(转)
CentOS7的/tmp目录自动清理规则 CentOS6以下系统(含)使用watchtmp + cron来实现定时清理临时文件的效果,这点在CentOS7发生了变化,在CentOS7下,系统使用sys ...
- windows系统下nodejs、npm、express的下载和安装教程——2016.11.09
1. node.js下载 首先进入http://nodejs.org/dist/,这里面的版本呢,几乎每个月都出几个新的,建议大家下载最新版本,看看自己的电脑是多少位的,别下错了. 下载完解压到你想放 ...
- 我的Android进阶之旅------>Android使用AlarmManager全局定时器实现定时更换壁纸
该DEMO将会通过AlarmManager来周期的调用ChangeService,从而让系统实现定时更换壁纸的功能. 更换壁纸的API为android.app.WallpaperManager,它提供 ...
- python 函数中的递归、lambda 、map reduce 等详解
举例说明 #例1: ###递归函数求和 from traitlets.traitlets import Instance def mysum(L): print(L) if not L: return ...
- abap 数字移动小游戏
[转自 http://blog.csdn.net/forever_crazy/article/details/6542507] report ...... selection-screen pushb ...
- 《C prime plus (第五版)》 ---第11章 字符串和字符串函数---3
字符串函数总结: 下面是头文件 string.h 中定义的函数: 序号 函数 & 描述 1 void *memchr(const void *str, int c, size_t n)在参数 ...
- ZOJ - 3430 Detect the Virus —— AC自动机、解码
题目链接:https://vjudge.net/problem/ZOJ-3430 Detect the Virus Time Limit: 2 Seconds Memory Limit: 6 ...