aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-03-09 15:24:37 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-03-09 15:44:05 +0100
commit8f2f8d4cadf95dea67d2cfc4a0c96c57234c0728 (patch)
tree9f87768e9569f4137d20813457874ca4a0e38d5c /pkg/domain
parent3e870f8c8e3736e9c81473d45c8148d4de0e70c3 (diff)
downloadpodman-8f2f8d4cadf95dea67d2cfc4a0c96c57234c0728.tar.gz
podman-8f2f8d4cadf95dea67d2cfc4a0c96c57234c0728.tar.bz2
podman-8f2f8d4cadf95dea67d2cfc4a0c96c57234c0728.zip
use gopkg.in/yaml.v2 instead of v3
Many dependencies already import gopkg.in/yaml.v2, podman is the only user of the v3 version except github.com/stretchr/testify but this is only a testing dependency so it will not end up in the binary. This change reduces the podman binary size from 54740 to 54260 KB on my system. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/play.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 4d8112c47..e72584207 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -28,7 +28,7 @@ import (
"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- yamlv3 "gopkg.in/yaml.v3"
+ yamlv2 "gopkg.in/yaml.v2"
v1apps "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
)
@@ -655,7 +655,7 @@ func readConfigMapFromFile(r io.Reader) (v1.ConfigMap, error) {
func splitMultiDocYAML(yamlContent []byte) ([][]byte, error) {
var documentList [][]byte
- d := yamlv3.NewDecoder(bytes.NewReader(yamlContent))
+ d := yamlv2.NewDecoder(bytes.NewReader(yamlContent))
for {
var o interface{}
// read individual document
@@ -669,7 +669,7 @@ func splitMultiDocYAML(yamlContent []byte) ([][]byte, error) {
if o != nil {
// back to bytes
- document, err := yamlv3.Marshal(o)
+ document, err := yamlv2.Marshal(o)
if err != nil {
return nil, errors.Wrapf(err, "individual doc yaml could not be marshalled")
}