Skip to content

Commit 6e393f6

Browse files
committed
move cmd package back to top level. Strip grpc plugin
1 parent 9053133 commit 6e393f6

File tree

9 files changed

+11
-1373
lines changed

9 files changed

+11
-1373
lines changed
File renamed without changes.
File renamed without changes.

config/source/cli/cli.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"github.com/imdario/mergo"
1111
"github.com/urfave/cli/v2"
12+
"go-micro.dev/v5/cmd"
1213
"go-micro.dev/v5/config/source"
13-
"go-micro.dev/v5/util/cmd"
1414
)
1515

1616
type cliSource struct {

config/source/cli/cli_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77

88
"github.com/urfave/cli/v2"
99
"go-micro.dev/v5"
10+
"go-micro.dev/v5/cmd"
1011
"go-micro.dev/v5/config"
1112
"go-micro.dev/v5/config/source"
12-
"go-micro.dev/v5/util/cmd"
1313
)
1414

1515
func TestCliSourceDefault(t *testing.T) {

go.mod

+4-50
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,11 @@ go 1.18
55
require (
66
github.com/bitly/go-simplejson v0.5.0
77
github.com/ef-ds/deque v1.0.4
8-
github.com/evanphx/json-patch/v5 v5.5.0
98
github.com/fsnotify/fsnotify v1.6.0
10-
github.com/fsouza/go-dockerclient v1.7.3
11-
github.com/go-acme/lego/v4 v4.4.0
12-
github.com/go-git/go-git/v5 v5.4.2
13-
github.com/gobwas/httphead v0.1.0
14-
github.com/gobwas/pool v0.2.1 // indirect
15-
github.com/gobwas/ws v1.0.4
169
github.com/golang/protobuf v1.5.4
1710
github.com/google/uuid v1.3.0
18-
github.com/gorilla/handlers v1.5.1
1911
github.com/imdario/mergo v0.3.12
2012
github.com/miekg/dns v1.1.43
21-
github.com/nxadm/tail v1.4.8
2213
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
2314
github.com/patrickmn/go-cache v2.1.0+incompatible
2415
github.com/pkg/errors v0.9.1
@@ -31,54 +22,17 @@ require (
3122
)
3223

3324
require (
34-
github.com/go-micro/plugins/v4/server/grpc v1.2.0
35-
github.com/gorilla/websocket v1.4.2
36-
)
37-
38-
require (
39-
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
40-
github.com/Microsoft/go-winio v0.6.0 // indirect
41-
github.com/Microsoft/hcsshim v0.9.7 // indirect
42-
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
43-
github.com/acomagu/bufpipe v1.0.3 // indirect
44-
github.com/containerd/cgroups v1.1.0 // indirect
45-
github.com/containerd/containerd v1.6.19 // indirect
25+
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
4626
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
4727
github.com/davecgh/go-spew v1.1.1 // indirect
48-
github.com/docker/docker v20.10.24+incompatible // indirect
49-
github.com/docker/go-connections v0.4.0 // indirect
50-
github.com/docker/go-units v0.4.0 // indirect
51-
github.com/emirpasic/gods v1.12.0 // indirect
52-
github.com/felixge/httpsnoop v1.0.1 // indirect
53-
github.com/go-git/gcfg v1.5.0 // indirect
54-
github.com/go-git/go-billy/v5 v5.3.1 // indirect
55-
github.com/gogo/protobuf v1.3.2 // indirect
56-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
57-
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
58-
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
28+
github.com/google/go-cmp v0.5.9 // indirect
5929
github.com/kr/pretty v0.3.0 // indirect
60-
github.com/mitchellh/go-homedir v1.1.0 // indirect
61-
github.com/moby/sys/mount v0.2.0 // indirect
62-
github.com/moby/sys/mountinfo v0.6.2 // indirect
63-
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
64-
github.com/morikuni/aec v1.0.0 // indirect
65-
github.com/opencontainers/go-digest v1.0.0 // indirect
66-
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
67-
github.com/opencontainers/runc v1.1.12 // indirect
6830
github.com/pmezard/go-difflib v1.0.0 // indirect
6931
github.com/russross/blackfriday/v2 v2.1.0 // indirect
70-
github.com/sergi/go-diff v1.1.0 // indirect
71-
github.com/sirupsen/logrus v1.9.0 // indirect
72-
github.com/xanzy/ssh-agent v0.3.0 // indirect
7332
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
74-
go.opencensus.io v0.24.0 // indirect
75-
golang.org/x/mod v0.9.0 // indirect
7633
golang.org/x/sys v0.18.0 // indirect
7734
golang.org/x/text v0.14.0 // indirect
78-
golang.org/x/tools v0.7.0 // indirect
79-
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
80-
google.golang.org/grpc v1.53.0 // indirect
81-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
82-
gopkg.in/warnings.v0 v0.1.2 // indirect
35+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
36+
gopkg.in/yaml.v2 v2.4.0 // indirect
8337
gopkg.in/yaml.v3 v3.0.1 // indirect
8438
)

go.sum

+1-1,315
Large diffs are not rendered by default.

options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"go-micro.dev/v5/broker"
1010
"go-micro.dev/v5/cache"
1111
"go-micro.dev/v5/client"
12+
"go-micro.dev/v5/cmd"
1213
"go-micro.dev/v5/config"
1314
"go-micro.dev/v5/debug/profile"
1415
"go-micro.dev/v5/debug/trace"
@@ -18,7 +19,6 @@ import (
1819
"go-micro.dev/v5/server"
1920
"go-micro.dev/v5/store"
2021
"go-micro.dev/v5/transport"
21-
"go-micro.dev/v5/util/cmd"
2222
)
2323

2424
// Options for micro service.

service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import (
77
"sync"
88

99
"go-micro.dev/v5/client"
10+
"go-micro.dev/v5/cmd"
1011
log "go-micro.dev/v5/logger"
1112
"go-micro.dev/v5/server"
1213
"go-micro.dev/v5/store"
13-
"go-micro.dev/v5/util/cmd"
1414
signalutil "go-micro.dev/v5/util/signal"
1515
)
1616

test/service.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import (
1010

1111
"github.com/pkg/errors"
1212

13-
proto "github.com/go-micro/plugins/v4/server/grpc/proto"
14-
1513
"go-micro.dev/v5"
1614
"go-micro.dev/v5/client"
1715
"go-micro.dev/v5/debug/handler"
@@ -127,7 +125,7 @@ func (stc *ServiceTestConfig) runParSeqTest(name string, c client.Client, p, s i
127125
}
128126

129127
// Handle is used as a test handler.
130-
func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *proto.Request) error {
128+
func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *pb.HealthRequest) error {
131129
stc.mu.Lock()
132130
stc.msgCount++
133131
stc.mu.Unlock()
@@ -136,7 +134,7 @@ func (stc *ServiceTestConfig) Handle(ctx context.Context, msg *proto.Request) er
136134
}
137135

138136
// HandleError is used as a test handler.
139-
func (stc *ServiceTestConfig) HandleError(ctx context.Context, msg *proto.Request) error {
137+
func (stc *ServiceTestConfig) HandleError(ctx context.Context, msg *pb.HealthRequest) error {
140138
return errors.New("dummy error")
141139
}
142140

0 commit comments

Comments
 (0)