Remove all gogoproto extensions
This commit removes the following gogoproto extensions; - gogoproto.nullable - gogoproto.customename - gogoproto.unmarshaller_all - gogoproto.stringer_all - gogoproto.sizer_all - gogoproto.marshaler_all - gogoproto.goproto_unregonized_all - gogoproto.goproto_stringer_all - gogoproto.goproto_getters_all None of them are supported by Google's toolchain (see #6564). Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
@@ -25,8 +25,8 @@ import (
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
func imagesToProto(images []images.Image) []imagesapi.Image {
|
||||
var imagespb []imagesapi.Image
|
||||
func imagesToProto(images []images.Image) []*imagesapi.Image {
|
||||
var imagespb []*imagesapi.Image
|
||||
|
||||
for _, image := range images {
|
||||
image := image
|
||||
@@ -36,8 +36,8 @@ func imagesToProto(images []images.Image) []imagesapi.Image {
|
||||
return imagespb
|
||||
}
|
||||
|
||||
func imageToProto(image *images.Image) imagesapi.Image {
|
||||
return imagesapi.Image{
|
||||
func imageToProto(image *images.Image) *imagesapi.Image {
|
||||
return &imagesapi.Image{
|
||||
Name: image.Name,
|
||||
Labels: image.Labels,
|
||||
Target: descToProto(&image.Target),
|
||||
@@ -50,7 +50,7 @@ func imageFromProto(imagepb *imagesapi.Image) images.Image {
|
||||
return images.Image{
|
||||
Name: imagepb.Name,
|
||||
Labels: imagepb.Labels,
|
||||
Target: descFromProto(&imagepb.Target),
|
||||
Target: descFromProto(imagepb.Target),
|
||||
CreatedAt: protobuf.FromTimestamp(imagepb.CreatedAt),
|
||||
UpdatedAt: protobuf.FromTimestamp(imagepb.UpdatedAt),
|
||||
}
|
||||
@@ -65,8 +65,8 @@ func descFromProto(desc *types.Descriptor) ocispec.Descriptor {
|
||||
}
|
||||
}
|
||||
|
||||
func descToProto(desc *ocispec.Descriptor) types.Descriptor {
|
||||
return types.Descriptor{
|
||||
func descToProto(desc *ocispec.Descriptor) *types.Descriptor {
|
||||
return &types.Descriptor{
|
||||
MediaType: desc.MediaType,
|
||||
Size_: desc.Size,
|
||||
Digest: desc.Digest.String(),
|
||||
|
||||
Reference in New Issue
Block a user