Skip to content

Commit 6f31bd3

Browse files
lvan100lianghuan
authored andcommitted
111
1 parent f3bd341 commit 6f31bd3

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ consistency and correctness.
2828

2929
## Features
3030

31-
* **IDL-driven**: Define service interfaces and data models using a simple interface definition language.
32-
* **Automatic code generation**: Generate Go code from IDL files, including:
33-
* Data model structs
34-
* Data validation logic
35-
* HTTP route bindings
36-
* Server interface definitions
37-
* Client call code
38-
* **Rich type support**: Supports basic types, structs, enums, lists, optional types, etc.
39-
* **Data validation**: Built-in validation rules with support for custom validators.
40-
* **HTTP parameter binding**: Automatically bind HTTP request parameters (path, query, header, body) to data models.
41-
* **Type embedding**: Supports type inheritance and field reuse to reduce redundancy.
42-
* **Flexible configuration**: Generate server code, client code, or both.
43-
* **Enum support**: Enum types with optional string serialization.
44-
* **Streaming support**: Generate streaming RPC interfaces.
45-
* **Annotation support**: Add Markdown-style comments in IDL (not yet implemented).
31+
- **IDL-driven**: Define service interfaces and data models using a simple interface definition language.
32+
- **Automatic code generation**: Generate Go code from IDL files, including:
33+
- Data model structs
34+
- Data validation logic
35+
- HTTP route bindings
36+
- Server interface definitions
37+
- Client call code
38+
- **Rich type support**: Supports basic types, structs, enums, lists, optional types, etc.
39+
- **Data validation**: Built-in validation rules with support for custom validators.
40+
- **HTTP parameter binding**: Automatically bind HTTP request parameters (path, query, header, body) to data models.
41+
- **Type embedding**: Supports type inheritance and field reuse to reduce redundancy.
42+
- **Flexible configuration**: Generate server code, client code, or both.
43+
- **Enum support**: Enum types with optional string serialization.
44+
- **Streaming support**: Generate streaming RPC interfaces.
45+
- **Annotation support**: Add Markdown-style comments in IDL (not yet implemented).
4646

4747
## Installation
4848

README_CN.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
## 项目简介
1616

17-
gs-http-gen 是一个基于 IDL(接口定义语言)的 HTTP 代码生成工具,专门用于 Go-Spring 框架。
17+
gs-http-gen 是一个基于 IDL(接口定义语言)的 HTTP 代码生成工具,专门用于 **Go-Spring** 框架。
1818
它可以根据定义的接口描述自动生成 HTTP 服务端和客户端代码,包括数据模型、验证逻辑、路由绑定等。
1919

2020
该工具旨在简化 Go 语言 Web 服务的开发流程,通过声明式的 IDL 定义自动生成样板代码,
2121
提高开发效率并减少手动编码错误。
2222

23-
更重要的,IDL 不仅仅用于代码生成,它还可以作为前后端、跨部门之间接口信息的统一约定和文档。
23+
更重要的是,IDL 不仅仅用于代码生成,它还可以作为前后端、跨部门之间接口信息的统一约定和文档。
2424
通过使用标准化的 IDL 描述语言,可以清晰地了解接口的请求参数、响应格式、验证规则等关键信息,
2525
有效减少沟通成本,确保接口的一致性和正确性。
2626

@@ -42,7 +42,7 @@ gs-http-gen 是一个基于 IDL(接口定义语言)的 HTTP 代码生成工
4242
- **流式处理**: 支持流式 RPC 接口生成
4343
- **注释支持**: 支持在 IDL 中添加 Markdown 格式注释(暂未实现)
4444

45-
## 安装工具
45+
## 工具安装
4646

4747
**推荐**使用 gs 集成开发工具,参考 [https://github.com/go-spring/gs](https://github.com/go-spring/gs)
4848

@@ -170,7 +170,6 @@ func (m *MyManagerServer) Stream(ctx context.Context, req *proto.StreamReq, resp
170170
// 注册路由
171171
mux := http.NewServeMux()
172172
proto.InitRouter(mux, &MyManagerServer{})
173-
174173
```
175174

176175
## 许可证

0 commit comments

Comments
 (0)