From b2eea6f18f840800c485481344b2a5ae3a45f126 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 26 Oct 2021 23:32:16 +0300 Subject: [PATCH] update import paths Signed-off-by: Vasiliy Tolstov --- generate.go | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- micro/service_micro.pb.go | 20 ++++++++++++++------ micro/service_micro_rpc.pb.go | 16 +++++++++------- options.go | 4 ++-- proto/service.pb.go | 12 ++++++------ proto/service.proto | 2 +- service.go | 12 ++++++------ 9 files changed, 45 insertions(+), 35 deletions(-) diff --git a/generate.go b/generate.go index fd527b4..9a34b83 100644 --- a/generate.go +++ b/generate.go @@ -1,3 +1,3 @@ package service -//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --micro_out=components=micro|rpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto +//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto diff --git a/go.mod b/go.mod index 3a180d5..5c54dd5 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/unistack-org/micro-config-service/v3 +module go.unistack.org/micro-config-service/v3 go 1.16 require ( github.com/imdario/mergo v0.3.12 - github.com/unistack-org/micro/v3 v3.7.8 + go.unistack.org/micro/v3 v3.8.5 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect google.golang.org/grpc v1.41.0 diff --git a/go.sum b/go.sum index 0be8c46..0067b5c 100644 --- a/go.sum +++ b/go.sum @@ -55,12 +55,12 @@ github.com/silas/dag v0.0.0-20210626123444-3804bac2d6d4/go.mod h1:7RTUFBdIRC9nZ7 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/unistack-org/micro-proto v0.0.9 h1:KrWLS4FUX7UAWNAilQf70uad6ZPf/0EudeddCXllRVc= -github.com/unistack-org/micro-proto v0.0.9/go.mod h1:Cckwmzd89gvS7ThxzZp9kQR/EOdksFQcsTAtDDyKwrg= -github.com/unistack-org/micro/v3 v3.7.8 h1:ytrJhomev32w5QdZ53G6uINHh9XDV6t6MyDz4p9b84c= -github.com/unistack-org/micro/v3 v3.7.8/go.mod h1:Ke/8WJlNZi4ZYwL9HcsANAbQ66/HocTBEZM+od99/mM= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.unistack.org/micro-proto/v3 v3.1.0 h1:q39FwjFiRZn+Ux/tt+d3bJTmDtsQQWa+3SLYVo1vLfA= +go.unistack.org/micro-proto/v3 v3.1.0/go.mod h1:DpRhYCBXlmSJ/AAXTmntvlh7kQkYU6eFvlmYAx4BQS8= +go.unistack.org/micro/v3 v3.8.5 h1:DIYWRsQF+NPhKZP45sCtNsUhaRw6u2+Ps7U+pKU7i3s= +go.unistack.org/micro/v3 v3.8.5/go.mod h1:KMMmOmbgo/D52/rCAbqeKbBsgEEbSKM69he54J3ZIuA= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/micro/service_micro.pb.go b/micro/service_micro.pb.go index f8eb439..6971290 100644 --- a/micro/service_micro.pb.go +++ b/micro/service_micro.pb.go @@ -1,16 +1,24 @@ -// Code generated by protoc-gen-micro +// Code generated by protoc-gen-go-micro. DO NOT EDIT. +// protoc-gen-go-micro version: v3.5.3 // source: service.proto + package servicepb import ( context "context" - proto "github.com/unistack-org/micro-config-service/v3/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" + proto "go.unistack.org/micro-config-service/v3/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" ) -func NewConfigEndpoints() []*api.Endpoint { - return []*api.Endpoint{} +var ( + ConfigName = "Config" + + ConfigEndpoints = []api.Endpoint{} +) + +func NewConfigEndpoints() []api.Endpoint { + return ConfigEndpoints } type ConfigClient interface { diff --git a/micro/service_micro_rpc.pb.go b/micro/service_micro_rpc.pb.go index 68520c2..6343c1a 100644 --- a/micro/service_micro_rpc.pb.go +++ b/micro/service_micro_rpc.pb.go @@ -1,13 +1,15 @@ -// Code generated by protoc-gen-micro +// Code generated by protoc-gen-go-micro. DO NOT EDIT. +// protoc-gen-go-micro version: v3.5.3 // source: service.proto + package servicepb import ( context "context" - proto "github.com/unistack-org/micro-config-service/v3/proto" - api "github.com/unistack-org/micro/v3/api" - client "github.com/unistack-org/micro/v3/client" - server "github.com/unistack-org/micro/v3/server" + proto "go.unistack.org/micro-config-service/v3/proto" + api "go.unistack.org/micro/v3/api" + client "go.unistack.org/micro/v3/client" + server "go.unistack.org/micro/v3/server" ) type configClient struct { @@ -59,8 +61,8 @@ func RegisterConfigServer(s server.Server, sh ConfigServer, opts ...server.Handl } h := &configServer{sh} var nopts []server.HandlerOption - for _, endpoint := range NewConfigEndpoints() { - nopts = append(nopts, api.WithEndpoint(endpoint)) + for _, endpoint := range ConfigEndpoints { + nopts = append(nopts, api.WithEndpoint(&endpoint)) } return s.Handle(s.NewHandler(&Config{h}, append(nopts, opts...)...)) } diff --git a/options.go b/options.go index 988a8ef..5816698 100644 --- a/options.go +++ b/options.go @@ -1,8 +1,8 @@ package service import ( - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/config" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/config" ) type clientKey struct{} diff --git a/proto/service.pb.go b/proto/service.pb.go index 93af2c1..9a61622 100644 --- a/proto/service.pb.go +++ b/proto/service.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.17.3 // source: service.proto package servicepb @@ -229,11 +229,11 @@ var file_service_proto_rawDesc = []byte{ 0x61, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, - 0x63, 0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/service.proto b/proto/service.proto index 7ec5c28..a495ae1 100644 --- a/proto/service.proto +++ b/proto/service.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package service; -option go_package="github.com/unistack-org/micro-config-service/v3/proto;servicepb"; +option go_package="go.unistack.org/micro-config-service/v3/proto;servicepb"; service Config { rpc Load(LoadRequest) returns (LoadResponse) {}; diff --git a/service.go b/service.go index 952ddda..6ca8e65 100644 --- a/service.go +++ b/service.go @@ -1,15 +1,15 @@ -package service +package service // import "go.unistack.org/micro-config-service/v3" import ( "context" "fmt" "github.com/imdario/mergo" - pbmicro "github.com/unistack-org/micro-config-service/v3/micro" - pb "github.com/unistack-org/micro-config-service/v3/proto" - "github.com/unistack-org/micro/v3/client" - "github.com/unistack-org/micro/v3/config" - rutil "github.com/unistack-org/micro/v3/util/reflect" + pbmicro "go.unistack.org/micro-config-service/v3/micro" + pb "go.unistack.org/micro-config-service/v3/proto" + "go.unistack.org/micro/v3/client" + "go.unistack.org/micro/v3/config" + rutil "go.unistack.org/micro/v3/util/reflect" ) var DefaultStructTag = "service"