Skip to content

Commit

Permalink
hotfix: fix print grpc msg bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wencaiwulue committed Dec 13, 2024
1 parent 5599dc6 commit 125b30a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
9 changes: 0 additions & 9 deletions pkg/dev/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,6 @@ func (option *Options) Dev(ctx context.Context, cConfig *Config, hostConfig *Hos
return configList.Run(ctx, volume, option.cli, option.dockerCli)
}

func disconnect(ctx context.Context, daemonClient rpc.DaemonClient, req *rpc.DisconnectRequest) error {
resp, err := daemonClient.Disconnect(ctx, req)
if err != nil {
return err
}
err = util.PrintGRPCStream[rpc.DisconnectResponse](resp)
return err
}

func (option *Options) CreateConnectContainer(portBindings nat.PortMap) (*RunConfig, error) {
portMap, portSet, err := option.GetExposePort(portBindings)
if err != nil {
Expand Down
5 changes: 0 additions & 5 deletions pkg/util/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"os"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

type Printable interface {
Expand All @@ -29,9 +27,6 @@ func PrintGRPCStream[T any](clientStream grpc.ClientStream, writers ...io.Writer
if errors.Is(err, io.EOF) {
return nil
}
if status.Code(err) == codes.Canceled {
return nil
}
if err != nil {
return err
}
Expand Down

0 comments on commit 125b30a

Please sign in to comment.