8000 GitHub - defeng-hub/restful-api-demo: go语言的 业务纵向分割模板
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

defeng-hub/restful-api-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

运行方法

go mod tidy

go run main.go start -f ./etc/pro.toml

restful-api-demo

go语言的 业务纵向分割模板

我之前的项目是mvc项目, 内部耦合性较大 现在从业务出发, 将模块拆分为纵向, 一棍子捅到底, 一个业务就是一个项目 对之前的项目进行拆分

all:对所有服务进行注册
apps:业务
cmd: 程序的CLI入口
common:公共包
conf:配置文件
dist:文件打包生成目录
etc:程序配置

环境(下边暂时不需要了)

  1. protoc 去下载
  2. protoc-gen-go [v1.31.0]
  3. protoc-gen-go-grpc [1.3.0]
  4. protoc-go-inject-tag [latest]
# 安装指定版本的方式
go install k8s.io/klog@v1.0.0

go install github.com/favadi/protoc-go-inject-tag@latest

About

go语言的 业务纵向分割模板

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0