🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More
Socket
Book a DemoInstallSign in
Socket

www.github.com/CharlesBases/protoc-gen-doc.git

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

www.github.com/CharlesBases/protoc-gen-doc.git

Go Modules
Version
v1.0.0
Version published
Created
Source

protoc-gen-doc

基于 proto 文件生成接口文档, 包含 Markdown 格式和 HTML 格式, 兼容 protoc 命令。

示例

  • 说明
    + proto.service.rpc
      // method 注释 | mthod uri
      eg: // 这是一个获取列表的接口 | [GET] /api/v1/list
      详细使用请参照 example
    
  • 编译
    git clone https://github.com/charlesbases/protoc-gen-doc.git
    cd protoc-gen-doc && make
    
    go get -u github.com/charlesbases/protoc-gen-doc
    
  • 运行
    protoc --proto_path=${GOPATH}/src:. --doc_out=proto/doc --go_out=. proto/auth/*.proto
    
    参数说明:
    --go_out: pb.go 输出目录 (proto 文件目录对应的相对路径)。
    --doc_out: 接口文件生成路径。(当前目录相对路径)
    

FAQs

Package last updated on 11 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts