Skip to content

Commit

Permalink
fix:fix pacakge name
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiaosu committed Jun 29, 2023
1 parent e5e68f2 commit 1bd92b1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion protoc-gen-go-crud/api/v1/users/users.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ option go_package = "bitbucket.org/antalphadev/earn/api/v1/users;usersV1";


// 用户管理
service Users {
service User {
// 用户列表
rpc ListUsers(ListUsersRequest) returns (ListUsersReply) {
option (google.api.http) = {get: "/v1/users"};
Expand Down
Binary file modified protoc-gen-go-crud/protoc-gen-go-crud
Binary file not shown.
2 changes: 1 addition & 1 deletion protoc-gen-go-crud/repositories/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TemplateParams struct {

func GenerateWireFile(path string, sets []string) error {
// 定义模板
tmpl := `package deliveries
tmpl := `package repositories
import "github.com/google/wire"
Expand Down
4 changes: 2 additions & 2 deletions protoc-gen-go-crud/usecase/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var crudTemplate = `
{{$firstLetter := (GetFirstLetter .ServiceType)}}
type I{{.ServiceType}}Usecase interface {
type I{{.ServiceType}}UseCase interface {
Create{{.ServiceType}}(ctx context.Context,in *{{.PackageName}}.Create{{.ServiceType}}Request) error
Update{{.ServiceType}}(ctx context.Context,in *{{.PackageName}}.Update{{.ServiceType}}Request) error
Delete{{.ServiceType}}(ctx context.Context,in *{{.PackageName}}.Delete{{.ServiceType}}Request) error
Expand All @@ -23,7 +23,7 @@ type I{{.ServiceType}}Usecase interface {
type {{.ServiceType}}UseCase struct {
}
func New{{.ServiceType}}UseCase() I{{.ServiceType}}Usecase {
func New{{.ServiceType}}UseCase() I{{.ServiceType}}UseCase {
return &{{.ServiceType}}UseCase{}
}
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-go-crud/usecase/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type TemplateParams struct {

func GenerateWireFile(path string, sets []string) error {
// 定义模板
tmpl := `package deliveries
tmpl := `package usecase
import "github.com/google/wire"
Expand Down

0 comments on commit 1bd92b1

Please sign in to comment.