Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
323617361d
|
|||
|
c57b75721e
|
|||
|
c3800bcf99
|
|||
|
86ef6e86bf
|
@@ -55,11 +55,18 @@ func AddServiceCommand() *cobra.Command {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err := gobuf.CreateFile(pbPath)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("read proto file failed (when create new file): %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
buf, err := gobuf.NewParser(pbPath)
|
buf, err := gobuf.NewParser(pbPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("read proto file failed: %v", err)
|
logrus.Errorf("read proto file failed: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if buf.ExistService(svcName) {
|
if buf.ExistService(svcName) {
|
||||||
logrus.Errorf("router group name exist")
|
logrus.Errorf("router group name exist")
|
||||||
return
|
return
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -6,7 +6,7 @@ require (
|
|||||||
code.gitea.io/sdk/gitea v0.17.1
|
code.gitea.io/sdk/gitea v0.17.1
|
||||||
github.com/sirupsen/logrus v1.9.3
|
github.com/sirupsen/logrus v1.9.3
|
||||||
github.com/spf13/cobra v1.8.0
|
github.com/spf13/cobra v1.8.0
|
||||||
gitter.top/common/gobuf v0.0.1
|
gitter.top/common/gobuf v0.0.4
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ option go_package = "{{.Name}}/gen;genv1";
|
|||||||
// @route_group: true
|
// @route_group: true
|
||||||
// @base_url: /v1/file
|
// @base_url: /v1/file
|
||||||
// @gen_to: ./services/controller/v1/file_controller.go
|
// @gen_to: ./services/controller/v1/file_controller.go
|
||||||
// @rpc_to: ./services/rpc/v1/file_impl.go
|
// @rpc_to: ./services/microservice/v1/file_service.go
|
||||||
service FileService {
|
service FileService {
|
||||||
// @desc: 列表
|
// @desc: 列表
|
||||||
// @author: Young Xu
|
// @author: Young Xu
|
||||||
|
|||||||
Reference in New Issue
Block a user