Skip to content

Commit 87bae7e

Browse files
committed
adjustment code
1 parent 289af43 commit 87bae7e

File tree

198 files changed

+521
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+521
-523
lines changed

.github/RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
## Change log
22

3-
- Fix `⓶ create grpc service based on sql`, selecting multiple tables to generate code reports **unsupported db driver error**.
4-
- The mongodb json tag supports both shake case and camel case naming.
3+
- Upgrade `go.opentelemetry.io/otel` and `golang.org/x/crypto` third-party libraries.
4+
- Adjusting the order of import packages.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
If you are develop RESTful web service or microservice with a simple CRUD API interface, you don't need to write any Go code can be compiled and deployed to the linux server, docker, k8s, just need to connect to the database (mysql、mongodb、postgresql、tidb、sqlite) to generate a complete service code.
2323

24-
If you develop generic web or microservices, just focus on the three core parts of `define database tables`, `define api interfaces in proto files`, `fill in business logic code in the generated template files`, and the rest of the go code is automatically generated by sponge.
24+
If you develop generic web or microservices, just focus on the three core parts of `define tables in the database`, `define api interfaces in the proto files`, `fill in business logic code in the generated template files`, and the rest of the go code is automatically generated by sponge.
2525

2626
<br>
2727

assets/readme-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
如果开发只有简单CRUD api接口的web或微服务,不需要编写任何go代码就可以编译并部署到linux服务器、docker、k8s上,只需要连接到数据库(mysql、mongodb、postgresql、tidb、sqlite)就可以一键自动生成完整的服务代码。
77

8-
如果开发通用的web或微服务,只需聚焦在`定义数据库表``在proto文件定义api接口``在生成的模板文件填写业务逻辑代码`三个核心部分,其他go代码都由sponge自动生成。
8+
如果开发通用的web或微服务,只需聚焦在`在数据库定义表``在proto文件定义api接口``在生成的模板文件填写业务逻辑代码`三个核心部分,其他go代码都由sponge自动生成。
99

1010
<br>
1111

cmd/protoc-gen-go-gin/internal/generate/handler/gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ package handler
44
import (
55
"bytes"
66

7-
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
8-
97
"google.golang.org/protobuf/compiler/protogen"
8+
9+
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
1010
)
1111

1212
// GenerateFiles generate handler logic, router, error code files.

cmd/protoc-gen-go-gin/internal/generate/router/gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
"bytes"
66
"strings"
77

8-
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
9-
108
"google.golang.org/protobuf/compiler/protogen"
119
"google.golang.org/protobuf/types/descriptorpb"
10+
11+
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
1212
)
1313

1414
const (

cmd/protoc-gen-go-gin/internal/generate/service/gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ package service
44
import (
55
"bytes"
66

7-
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
8-
97
"google.golang.org/protobuf/compiler/protogen"
8+
9+
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/parse"
1010
)
1111

1212
// GenerateFiles generate service logic, router, error code files.

cmd/protoc-gen-go-gin/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010
"strings"
1111
"time"
1212

13+
"google.golang.org/protobuf/compiler/protogen"
14+
"google.golang.org/protobuf/types/pluginpb"
15+
1316
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/generate/handler"
1417
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/generate/router"
1518
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-gin/internal/generate/service"
16-
17-
"google.golang.org/protobuf/compiler/protogen"
18-
"google.golang.org/protobuf/types/pluginpb"
1919
)
2020

2121
const (

cmd/protoc-gen-go-rpc-tmpl/internal/generate/service/gen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"runtime"
77
"strings"
88

9-
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-rpc-tmpl/internal/parse"
10-
119
"google.golang.org/protobuf/compiler/protogen"
10+
11+
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-rpc-tmpl/internal/parse"
1212
)
1313

1414
// GenerateFiles generate service template code and error codes

cmd/protoc-gen-go-rpc-tmpl/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"strings"
1111
"time"
1212

13-
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-rpc-tmpl/internal/generate/service"
14-
1513
"google.golang.org/protobuf/compiler/protogen"
1614
"google.golang.org/protobuf/types/pluginpb"
15+
16+
"github.com/zhufuyi/sponge/cmd/protoc-gen-go-rpc-tmpl/internal/generate/service"
1717
)
1818

1919
const (

cmd/serverNameExample_grpcExample/initial/close.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import (
44
"context"
55
"time"
66

7-
"github.com/zhufuyi/sponge/internal/config"
8-
"github.com/zhufuyi/sponge/internal/model"
9-
107
"github.com/zhufuyi/sponge/pkg/app"
118
"github.com/zhufuyi/sponge/pkg/tracer"
9+
10+
"github.com/zhufuyi/sponge/internal/config"
11+
"github.com/zhufuyi/sponge/internal/model"
1212
)
1313

1414
// Close releasing resources after service exit

0 commit comments

Comments
 (0)