mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	move cmd package back to top level. Strip grpc plugin
This commit is contained in:
		| @@ -9,8 +9,8 @@ import ( | ||||
|  | ||||
| 	"github.com/imdario/mergo" | ||||
| 	"github.com/urfave/cli/v2" | ||||
| 	"go-micro.dev/v5/cmd" | ||||
| 	"go-micro.dev/v5/config/source" | ||||
| 	"go-micro.dev/v5/util/cmd" | ||||
| ) | ||||
|  | ||||
| type cliSource struct { | ||||
|   | ||||
| @@ -7,9 +7,9 @@ import ( | ||||
|  | ||||
| 	"github.com/urfave/cli/v2" | ||||
| 	"go-micro.dev/v5" | ||||
| 	"go-micro.dev/v5/cmd" | ||||
| 	"go-micro.dev/v5/config" | ||||
| 	"go-micro.dev/v5/config/source" | ||||
| 	"go-micro.dev/v5/util/cmd" | ||||
| ) | ||||
|  | ||||
| func TestCliSourceDefault(t *testing.T) { | ||||
|   | ||||
							
								
								
									
										54
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								go.mod
									
									
									
									
									
								
							| @@ -5,20 +5,11 @@ go 1.18 | ||||
| require ( | ||||
| 	github.com/bitly/go-simplejson v0.5.0 | ||||
| 	github.com/ef-ds/deque v1.0.4 | ||||
| 	github.com/evanphx/json-patch/v5 v5.5.0 | ||||
| 	github.com/fsnotify/fsnotify v1.6.0 | ||||
| 	github.com/fsouza/go-dockerclient v1.7.3 | ||||
| 	github.com/go-acme/lego/v4 v4.4.0 | ||||
| 	github.com/go-git/go-git/v5 v5.4.2 | ||||
| 	github.com/gobwas/httphead v0.1.0 | ||||
| 	github.com/gobwas/pool v0.2.1 // indirect | ||||
| 	github.com/gobwas/ws v1.0.4 | ||||
| 	github.com/golang/protobuf v1.5.4 | ||||
| 	github.com/google/uuid v1.3.0 | ||||
| 	github.com/gorilla/handlers v1.5.1 | ||||
| 	github.com/imdario/mergo v0.3.12 | ||||
| 	github.com/miekg/dns v1.1.43 | ||||
| 	github.com/nxadm/tail v1.4.8 | ||||
| 	github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c | ||||
| 	github.com/patrickmn/go-cache v2.1.0+incompatible | ||||
| 	github.com/pkg/errors v0.9.1 | ||||
| @@ -31,54 +22,17 @@ require ( | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/go-micro/plugins/v4/server/grpc v1.2.0 | ||||
| 	github.com/gorilla/websocket v1.4.2 | ||||
| ) | ||||
|  | ||||
| require ( | ||||
| 	github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect | ||||
| 	github.com/Microsoft/go-winio v0.6.0 // indirect | ||||
| 	github.com/Microsoft/hcsshim v0.9.7 // indirect | ||||
| 	github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect | ||||
| 	github.com/acomagu/bufpipe v1.0.3 // indirect | ||||
| 	github.com/containerd/cgroups v1.1.0 // indirect | ||||
| 	github.com/containerd/containerd v1.6.19 // indirect | ||||
| 	github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect | ||||
| 	github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/docker/docker v20.10.24+incompatible // indirect | ||||
| 	github.com/docker/go-connections v0.4.0 // indirect | ||||
| 	github.com/docker/go-units v0.4.0 // indirect | ||||
| 	github.com/emirpasic/gods v1.12.0 // indirect | ||||
| 	github.com/felixge/httpsnoop v1.0.1 // indirect | ||||
| 	github.com/go-git/gcfg v1.5.0 // indirect | ||||
| 	github.com/go-git/go-billy/v5 v5.3.1 // indirect | ||||
| 	github.com/gogo/protobuf v1.3.2 // indirect | ||||
| 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||||
| 	github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect | ||||
| 	github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect | ||||
| 	github.com/google/go-cmp v0.5.9 // indirect | ||||
| 	github.com/kr/pretty v0.3.0 // indirect | ||||
| 	github.com/mitchellh/go-homedir v1.1.0 // indirect | ||||
| 	github.com/moby/sys/mount v0.2.0 // indirect | ||||
| 	github.com/moby/sys/mountinfo v0.6.2 // indirect | ||||
| 	github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect | ||||
| 	github.com/morikuni/aec v1.0.0 // indirect | ||||
| 	github.com/opencontainers/go-digest v1.0.0 // indirect | ||||
| 	github.com/opencontainers/image-spec v1.1.0-rc2 // indirect | ||||
| 	github.com/opencontainers/runc v1.1.12 // indirect | ||||
| 	github.com/pmezard/go-difflib v1.0.0 // indirect | ||||
| 	github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||||
| 	github.com/sergi/go-diff v1.1.0 // indirect | ||||
| 	github.com/sirupsen/logrus v1.9.0 // indirect | ||||
| 	github.com/xanzy/ssh-agent v0.3.0 // indirect | ||||
| 	github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect | ||||
| 	go.opencensus.io v0.24.0 // indirect | ||||
| 	golang.org/x/mod v0.9.0 // indirect | ||||
| 	golang.org/x/sys v0.18.0 // indirect | ||||
| 	golang.org/x/text v0.14.0 // indirect | ||||
| 	golang.org/x/tools v0.7.0 // indirect | ||||
| 	google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect | ||||
| 	google.golang.org/grpc v1.53.0 // indirect | ||||
| 	gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect | ||||
| 	gopkg.in/warnings.v0 v0.1.2 // indirect | ||||
| 	gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -9,6 +9,7 @@ import ( | ||||
| 	"go-micro.dev/v5/broker" | ||||
| 	"go-micro.dev/v5/cache" | ||||
| 	"go-micro.dev/v5/client" | ||||
| 	"go-micro.dev/v5/cmd" | ||||
| 	"go-micro.dev/v5/config" | ||||
| 	"go-micro.dev/v5/debug/profile" | ||||
| 	"go-micro.dev/v5/debug/trace" | ||||
| @@ -18,7 +19,6 @@ import ( | ||||
| 	"go-micro.dev/v5/server" | ||||
| 	"go-micro.dev/v5/store" | ||||
| 	"go-micro.dev/v5/transport" | ||||
| 	"go-micro.dev/v5/util/cmd" | ||||
| ) | ||||
|  | ||||
| // Options for micro service. | ||||
|   | ||||
| @@ -7,10 +7,10 @@ import ( | ||||
| 	"sync" | ||||
|  | ||||
| 	"go-micro.dev/v5/client" | ||||
| 	"go-micro.dev/v5/cmd" | ||||
| 	log "go-micro.dev/v5/logger" | ||||
| 	"go-micro.dev/v5/server" | ||||
| 	"go-micro.dev/v5/store" | ||||
| 	"go-micro.dev/v5/util/cmd" | ||||
| 	signalutil "go-micro.dev/v5/util/signal" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -10,8 +10,6 @@ import ( | ||||
|  | ||||
| 	"github.com/pkg/errors" | ||||
|  | ||||
| 	proto "github.com/go-micro/plugins/v4/server/grpc/proto" | ||||
|  | ||||
| 	"go-micro.dev/v5" | ||||
| 	"go-micro.dev/v5/client" | ||||
| 	"go-micro.dev/v5/debug/handler" | ||||
| @@ -127,7 +125,7 @@ func (stc *ServiceTestConfig) runParSeqTest(name string, c client.Client, p, s i | ||||
| } | ||||
|  | ||||
| // Handle is used as a test handler. | ||||
| func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *proto.Request) error { | ||||
| func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *pb.HealthRequest) error { | ||||
| 	stc.mu.Lock() | ||||
| 	stc.msgCount++ | ||||
| 	stc.mu.Unlock() | ||||
| @@ -136,7 +134,7 @@ func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *proto.Request) er | ||||
| } | ||||
|  | ||||
| // HandleError is used as a test handler. | ||||
| func (stc *ServiceTestConfig) HandleError(ctx context.Context, msg *proto.Request) error { | ||||
| func (stc *ServiceTestConfig) HandleError(ctx context.Context, msg *pb.HealthRequest) error { | ||||
| 	return errors.New("dummy error") | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user