Remove gogoproto.stdtime

This commit removes gogoproto.stdtime, since it is not supported by
Google's official toolchain
(see https://github.com/containerd/containerd/issues/6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-04-18 22:12:15 +00:00
parent 26a3ab446b
commit 80b825ca2c
71 changed files with 1803 additions and 1594 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/containerd/containerd/api/types"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/images"
"github.com/containerd/containerd/protobuf"
ptypes "github.com/gogo/protobuf/types"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
@@ -111,8 +112,8 @@ func imageToProto(image *images.Image) imagesapi.Image {
Name: image.Name,
Labels: image.Labels,
Target: descToProto(&image.Target),
CreatedAt: image.CreatedAt,
UpdatedAt: image.UpdatedAt,
CreatedAt: protobuf.ToTimestamp(image.CreatedAt),
UpdatedAt: protobuf.ToTimestamp(image.UpdatedAt),
}
}
@@ -121,8 +122,8 @@ func imageFromProto(imagepb *imagesapi.Image) images.Image {
Name: imagepb.Name,
Labels: imagepb.Labels,
Target: descFromProto(&imagepb.Target),
CreatedAt: imagepb.CreatedAt,
UpdatedAt: imagepb.UpdatedAt,
CreatedAt: protobuf.FromTimestamp(imagepb.CreatedAt),
UpdatedAt: protobuf.FromTimestamp(imagepb.UpdatedAt),
}
}