summaryrefslogtreecommitdiff
path: root/vendor/github.com/gogo
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-09-05 16:58:06 +0200
committerSascha Grunert <sgrunert@suse.com>2019-09-05 16:58:08 +0200
commitf66a2069f1b26ff9987b008ba4b0c91ac3b682cc (patch)
tree1219ee0e7b87494eaf2c6ace56d4ecada0dc4a39 /vendor/github.com/gogo
parentb962b1e3538312f145aea0cf5546ae31f35f635f (diff)
downloadpodman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.tar.gz
podman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.tar.bz2
podman-f66a2069f1b26ff9987b008ba4b0c91ac3b682cc.zip
Update buildah to v1.11.0
Vendor in the latest changes for buildah to apply the implemented features here as well. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'vendor/github.com/gogo')
-rw-r--r--vendor/github.com/gogo/protobuf/proto/extensions.go1
-rw-r--r--vendor/github.com/gogo/protobuf/proto/extensions_gogo.go21
2 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/gogo/protobuf/proto/extensions.go b/vendor/github.com/gogo/protobuf/proto/extensions.go
index 686bd2a09..341c6f57f 100644
--- a/vendor/github.com/gogo/protobuf/proto/extensions.go
+++ b/vendor/github.com/gogo/protobuf/proto/extensions.go
@@ -527,6 +527,7 @@ func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
// SetExtension sets the specified extension of pb to the specified value.
func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
if epb, ok := pb.(extensionsBytes); ok {
+ ClearExtension(pb, extension)
newb, err := encodeExtension(extension, value)
if err != nil {
return err
diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
index 53ebd8cca..6f1ae120e 100644
--- a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
@@ -154,6 +154,10 @@ func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error)
return EncodeExtensionMap(m.extensionsWrite(), data)
}
+func EncodeInternalExtensionBackwards(m extendableProto, data []byte) (n int, err error) {
+ return EncodeExtensionMapBackwards(m.extensionsWrite(), data)
+}
+
func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) {
o := 0
for _, e := range m {
@@ -169,6 +173,23 @@ func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) {
return o, nil
}
+func EncodeExtensionMapBackwards(m map[int32]Extension, data []byte) (n int, err error) {
+ o := 0
+ end := len(data)
+ for _, e := range m {
+ if err := e.Encode(); err != nil {
+ return 0, err
+ }
+ n := copy(data[end-len(e.enc):], e.enc)
+ if n != len(e.enc) {
+ return 0, io.ErrShortBuffer
+ }
+ end -= n
+ o += n
+ }
+ return o, nil
+}
+
func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) {
e := m[id]
if err := e.Encode(); err != nil {