Skip to content

Commit

Permalink
move cmd package back to top level. Strip grpc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jul 7, 2024
1 parent 9053133 commit 6e393f6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 1,373 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config/source/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion config/source/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
54 changes: 4 additions & 50 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
1,316 changes: 1 addition & 1,315 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 2 additions & 4 deletions test/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand All @@ -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")
}

Expand Down

0 comments on commit 6e393f6

Please sign in to comment.