From 1bd92b1861a6844a807c4b52f4499f507cb2ffc2 Mon Sep 17 00:00:00 2001 From: "yuhao.su" <644208937@qq.com> Date: Thu, 29 Jun 2023 14:29:31 +0800 Subject: [PATCH] fix:fix pacakge name --- protoc-gen-go-crud/api/v1/users/users.proto | 2 +- protoc-gen-go-crud/protoc-gen-go-crud | Bin 14073570 -> 14073570 bytes protoc-gen-go-crud/repositories/wire.go | 2 +- protoc-gen-go-crud/usecase/template.go | 4 ++-- protoc-gen-go-crud/usecase/wire.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/protoc-gen-go-crud/api/v1/users/users.proto b/protoc-gen-go-crud/api/v1/users/users.proto index 1d7e296..ddff99b 100644 --- a/protoc-gen-go-crud/api/v1/users/users.proto +++ b/protoc-gen-go-crud/api/v1/users/users.proto @@ -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"}; diff --git a/protoc-gen-go-crud/protoc-gen-go-crud b/protoc-gen-go-crud/protoc-gen-go-crud index b781c48ac60b27b728c7278d706f3c3cc153615a..c5843312f509dce351bfbc74240738fffb6d40a0 100755 GIT binary patch delta 1295 zcmb`@$y1XD0EY32T8f6+P?rX^7?&2T2KcgLtr8R?0ZAf+O;O15X$0Irpi14_h(;wU z#-$?etyRH|4{_i3T5QFt7fd^DGmfVodT7VT|DiMQ@AzJx@V`$Y!e~(_vNO$Ib)H8z z*JYnmV=tUxH|qskqC>BqkX~Imexj%@b(C9$oV09nVy4NVo3F`EubSnwTJ-tOLajrc zSmmy^=J^c1@{B_BJWEAZZsknpO1HxAR>;r|-O&RdAOasE57+oeYS*z7*Tw*A}5>U!D$vH{7(Lyo{IV^#GJ;ai-iqL;bTZ~^B zV}l(IOhGns;6yI+kdFcsVk)Mg2-7hG#VCObZg}8@h?$rLA7-NzWhloS%*8y+#{yKK z5(`mc;#(}iQY^!AtiVdF!gu%{eym0v)?lrqj0r@?b?fLYU5vIpjrhM> z4v-!TL8DCS5`syxQ1RO=r$5CSz&fnQ1}Vi_ADpH}+sJ_F+E`;2?g)PdJ31aTrH%6wPSCF&xJUoWv=#LP8r(qa9~(7Uyst z7jO}ma2Z!{71wYbH*gcTa2t1U7x(ZB?&DW<-~oP zGff){+RsKw;o}ce7OB?0*=H=$s*avN^O>)n{u)eeI9W&zXN&o-= delta 1293 zcmb`@*HhC60KoAB6|p#i3vi}&p%q9-ei@*ZQY9=&VuoO?V17ve#Q~B4v93BI6$c^) z_ZA0QOUJLZbuUm+R8UV}ygcZG=k+{&=$)td^?&f;^Z0%F2H!sk3*wASX7T8YXL|J> zx0r8om^>xMj8fhF1b4pGS>njZFA*!8K3nCYLS}(ebEn}`bhN0 z01U(+3`P{95rZKZieVUz5f}+MzQk7;h0z#;u^5L~jK>6gjfsduJQARQ5{Xbj4FMWx zp@SYtNX8^g#y6OP6nu+Re21x+hBO$EjtpcX3)z^C97&WJb>XpUr>L2ms8(t9Izg`x z+)k}lE4bVaw@%bKReF`fa9velAuUZXai~6*w#2^m%2CuX-!g9ePn|mx2R3pY4%{y^BuvollEAHZOZh-lTUe!?U}ZrMfGx z&-S)Qv|Gz6q+oMriccW}>V?vMZg diff --git a/protoc-gen-go-crud/repositories/wire.go b/protoc-gen-go-crud/repositories/wire.go index 82ce685..ae23184 100644 --- a/protoc-gen-go-crud/repositories/wire.go +++ b/protoc-gen-go-crud/repositories/wire.go @@ -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" diff --git a/protoc-gen-go-crud/usecase/template.go b/protoc-gen-go-crud/usecase/template.go index cbb73df..ccd558e 100644 --- a/protoc-gen-go-crud/usecase/template.go +++ b/protoc-gen-go-crud/usecase/template.go @@ -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 @@ -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{} } diff --git a/protoc-gen-go-crud/usecase/wire.go b/protoc-gen-go-crud/usecase/wire.go index 5e5bf5e..43b9e2d 100644 --- a/protoc-gen-go-crud/usecase/wire.go +++ b/protoc-gen-go-crud/usecase/wire.go @@ -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"