Skip to content

Update module gopkg.in/yaml.v2 to v3 #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ require (
github.com/urfave/cli v1.22.16
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d
golang.org/x/oauth2 v0.30.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.16.3
sigs.k8s.io/release-utils v0.11.1
Expand Down Expand Up @@ -232,6 +231,7 @@ require (
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.5.1 // indirect
k8s.io/api v0.31.3 // indirect
k8s.io/apiextensions-apiserver v0.31.3 // indirect
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"github.com/rancher/charts-build-scripts/pkg/validate"
"github.com/rancher/charts-build-scripts/pkg/zip"
"github.com/urfave/cli"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

const (
Expand Down Expand Up @@ -782,7 +782,7 @@
logger.Fatal(ctx, fmt.Errorf("unable to find configuration file: %w", err).Error())
}
chartsScriptOptions := options.ChartsScriptOptions{}
if err := yaml.UnmarshalStrict(configYaml, &chartsScriptOptions); err != nil {

Check failure on line 785 in main.go

View workflow job for this annotation

GitHub Actions / build

undefined: yaml.UnmarshalStrict

Check failure on line 785 in main.go

View workflow job for this annotation

GitHub Actions / test

undefined: yaml.UnmarshalStrict
logger.Fatal(ctx, fmt.Errorf("unable to unmarshall configuration file: %w", err).Error())
}
return &chartsScriptOptions
Expand Down
2 changes: 1 addition & 1 deletion pkg/charts/crdchart.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/rancher/charts-build-scripts/pkg/filesystem"
"github.com/rancher/charts-build-scripts/pkg/logger"
"github.com/rancher/charts-build-scripts/pkg/path"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

// ValidateInstallCRDContentsFmt is the format for the contents of ChartValidateInstallCRDFile
Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/rancher/charts-build-scripts/pkg/logger"
yamlV2 "gopkg.in/yaml.v2"
yamlV2 "gopkg.in/yaml.v3"
yamlV3 "gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/options/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/go-git/go-billy/v5"
"github.com/rancher/charts-build-scripts/pkg/filesystem"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

// PackageOptions represent the options presented to users to be able to configure the way a package is built using these scripts
Expand Down
2 changes: 1 addition & 1 deletion pkg/options/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/go-git/go-billy/v5"
"github.com/rancher/charts-build-scripts/pkg/filesystem"
"github.com/rancher/charts-build-scripts/pkg/logger"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

// ValidateOptions specify an upstream GitHub repository you would like to validate against
Expand Down
Loading