From b4231422b3b4663eb2265b78cfe9122909594688 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 14 Jul 2021 13:49:37 +0300 Subject: [PATCH] add ServiceName variable Signed-off-by: Vasiliy Tolstov --- util.go | 2 ++ variables.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/util.go b/util.go index 003b058..d4ee807 100644 --- a/util.go +++ b/util.go @@ -449,6 +449,8 @@ func generateServiceServerStreamInterface(gfile *protogen.GeneratedFile, service func generateServiceEndpoints(gfile *protogen.GeneratedFile, service *protogen.Service) { serviceName := service.GoName gfile.P("var (") + gfile.P(serviceName, "Name", "=", `"`, serviceName, `"`) + gfile.P() gfile.P(serviceName, "Endpoints", "=", "[]", microApiPackage.Ident("Endpoint"), "{") for _, method := range service.Methods { if method.Desc.Options() == nil { diff --git a/variables.go b/variables.go index ef57f27..250b9db 100644 --- a/variables.go +++ b/variables.go @@ -17,5 +17,5 @@ var ( microClientHttpPackage = protogen.GoImportPath("github.com/unistack-org/micro-client-http/v3") timePackage = protogen.GoImportPath("time") deprecationComment = "// Deprecated: Do not use." - versionComment = "v3.4.1" + versionComment = "v3.4.2" )