Compare commits

..

No commits in common. "c57b75721ef21392d156bf1fe63d663c9c20ef9a" and "86ef6e86bf0892cb54148ab1b2fe4b35a033cf2f" have entirely different histories.

3 changed files with 4 additions and 13 deletions

View File

@ -1,7 +1,6 @@
package bootstrap
import (
"errors"
"os"
"github.com/sirupsen/logrus"
@ -58,17 +57,9 @@ func AddServiceCommand() *cobra.Command {
buf, err := gobuf.NewParser(pbPath)
if err != nil {
if !errors.Is(err, os.ErrNotExist) {
logrus.Errorf("read proto file failed: %v", err)
return
}
err := buf.CreateFile(pbPath)
if err != nil {
logrus.Errorf("read proto file failed (when create new file): %v", err)
return
}
}
if buf.ExistService(svcName) {
logrus.Errorf("router group name exist")
return

2
go.mod
View File

@ -6,7 +6,7 @@ require (
code.gitea.io/sdk/gitea v0.17.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
gitter.top/common/gobuf v0.0.3
gitter.top/common/gobuf v0.0.2
gopkg.in/yaml.v3 v3.0.1
)

View File

@ -10,7 +10,7 @@ option go_package = "{{.Name}}/gen;genv1";
// @route_group: true
// @base_url: /v1/file
// @gen_to: ./services/controller/v1/file_controller.go
// @rpc_to: ./services/microservice/v1/file_service.go
// @rpc_to: ./services/rpc/v1/file_impl.go
service FileService {
// @desc: 列表
// @author: Young Xu