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:
Tobias Klauser
2020-03-10 09:41:03 +01:00
parent 4eb9d15dc6
commit a9bd451ab4
3 changed files with 3 additions and 6 deletions

View File

@@ -45,7 +45,6 @@ import (
runcC "github.com/containerd/go-runc"
"github.com/containerd/typeurl"
"github.com/gogo/protobuf/proto"
"github.com/gogo/protobuf/types"
ptypes "github.com/gogo/protobuf/types"
"github.com/pkg/errors"
"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 len(data) > 0 {
var any types.Any
var any ptypes.Any
if err := proto.Unmarshal(data, &any); err != nil {
return "", err
}