Avoid duplicate imports of github.com/gogo/protobuf/types
Re-use the import aliased as `ptypes`. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
parent
4eb9d15dc6
commit
a9bd451ab4
@ -58,7 +58,6 @@ import (
|
|||||||
"github.com/containerd/containerd/snapshots"
|
"github.com/containerd/containerd/snapshots"
|
||||||
snproxy "github.com/containerd/containerd/snapshots/proxy"
|
snproxy "github.com/containerd/containerd/snapshots/proxy"
|
||||||
"github.com/containerd/typeurl"
|
"github.com/containerd/typeurl"
|
||||||
"github.com/gogo/protobuf/types"
|
|
||||||
ptypes "github.com/gogo/protobuf/types"
|
ptypes "github.com/gogo/protobuf/types"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||||
@ -723,7 +722,7 @@ func (c *Client) Server(ctx context.Context) (ServerInfo, error) {
|
|||||||
}
|
}
|
||||||
c.connMu.Unlock()
|
c.connMu.Unlock()
|
||||||
|
|
||||||
response, err := c.IntrospectionService().Server(ctx, &types.Empty{})
|
response, err := c.IntrospectionService().Server(ctx, &ptypes.Empty{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ServerInfo{}, err
|
return ServerInfo{}, err
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,6 @@ import (
|
|||||||
runcC "github.com/containerd/go-runc"
|
runcC "github.com/containerd/go-runc"
|
||||||
"github.com/containerd/typeurl"
|
"github.com/containerd/typeurl"
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/gogo/protobuf/types"
|
|
||||||
ptypes "github.com/gogo/protobuf/types"
|
ptypes "github.com/gogo/protobuf/types"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -166,7 +165,7 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container
|
|||||||
}
|
}
|
||||||
if data, err := ioutil.ReadAll(os.Stdin); err == nil {
|
if data, err := ioutil.ReadAll(os.Stdin); err == nil {
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
var any types.Any
|
var any ptypes.Any
|
||||||
if err := proto.Unmarshal(data, &any); err != nil {
|
if err := proto.Unmarshal(data, &any); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,6 @@ import (
|
|||||||
runcC "github.com/containerd/go-runc"
|
runcC "github.com/containerd/go-runc"
|
||||||
"github.com/containerd/typeurl"
|
"github.com/containerd/typeurl"
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/gogo/protobuf/types"
|
|
||||||
ptypes "github.com/gogo/protobuf/types"
|
ptypes "github.com/gogo/protobuf/types"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -211,7 +210,7 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container
|
|||||||
}
|
}
|
||||||
if data, err := ioutil.ReadAll(os.Stdin); err == nil {
|
if data, err := ioutil.ReadAll(os.Stdin); err == nil {
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
var any types.Any
|
var any ptypes.Any
|
||||||
if err := proto.Unmarshal(data, &any); err != nil {
|
if err := proto.Unmarshal(data, &any); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user