Skip to content

Commit e402880

Browse files
authored
chore(deps): use go.yaml.in/yaml/v3 (#613)
1 parent 49a1b8d commit e402880

File tree

11 files changed

+13
-33
lines changed

11 files changed

+13
-33
lines changed

action/config/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/sirupsen/logrus"
99
"github.com/spf13/afero"
10-
yaml "gopkg.in/yaml.v3"
10+
yaml "go.yaml.in/yaml/v3"
1111
)
1212

1313
// create filesystem based on the operating system

action/config/load.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/sirupsen/logrus"
99
"github.com/spf13/afero"
1010
"github.com/urfave/cli/v3"
11-
yaml "gopkg.in/yaml.v3"
11+
yaml "go.yaml.in/yaml/v3"
1212

1313
"github.com/go-vela/cli/internal"
1414
)
@@ -50,8 +50,6 @@ func (c *Config) Load(cmd *cli.Command) error {
5050
config := new(ConfigFile)
5151

5252
// update the config object with the current content
53-
//
54-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Unmarshal
5553
err = yaml.Unmarshal(data, config)
5654
if err != nil {
5755
return err

action/config/remove.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/sirupsen/logrus"
1010
"github.com/spf13/afero"
11-
yaml "gopkg.in/yaml.v3"
11+
yaml "go.yaml.in/yaml/v3"
1212

1313
"github.com/go-vela/cli/internal"
1414
)
@@ -62,8 +62,6 @@ func (c *Config) Remove() error {
6262
config := new(ConfigFile)
6363

6464
// update the config object with the current content
65-
//
66-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Unmarshal
6765
err = yaml.Unmarshal(data, config)
6866
if err != nil {
6967
return err
@@ -179,8 +177,6 @@ func (c *Config) Remove() error {
179177
logrus.Trace("creating file content for config file")
180178

181179
// create output for config file
182-
//
183-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Marshal
184180
out, err := yaml.Marshal(config)
185181
if err != nil {
186182
return err

action/config/update.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/sirupsen/logrus"
99
"github.com/spf13/afero"
10-
yaml "gopkg.in/yaml.v3"
10+
yaml "go.yaml.in/yaml/v3"
1111

1212
"github.com/go-vela/cli/internal"
1313
"github.com/go-vela/sdk-go/vela"
@@ -52,8 +52,6 @@ func (c *Config) Update() error {
5252
config := new(ConfigFile)
5353

5454
// update the config object with the current content
55-
//
56-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Unmarshal
5755
err = yaml.Unmarshal(data, config)
5856
if err != nil {
5957
return err
@@ -173,8 +171,6 @@ func (c *Config) Update() error {
173171
logrus.Trace("creating file content for config file")
174172

175173
// create output for config file
176-
//
177-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Marshal
178174
out, err := yaml.Marshal(config)
179175
if err != nil {
180176
return err

action/pipeline/generate.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"os"
77
"path/filepath"
88

9-
"github.com/buildkite/yaml"
109
"github.com/sirupsen/logrus"
1110
"github.com/spf13/afero"
11+
"go.yaml.in/yaml/v3"
1212
)
1313

1414
// create filesystem based on the operating system
@@ -31,8 +31,6 @@ func (c *Config) Generate() error {
3131
logrus.Trace("creating file content from pipeline")
3232

3333
// create output for pipeline file
34-
//
35-
// https://pkg.go.dev/github.com/buildkite/yaml?tab=doc#Marshal
3634
out, err := yaml.Marshal(pipeline)
3735
if err != nil {
3836
return err

action/secret/add.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111

1212
"github.com/sirupsen/logrus"
13-
yaml "gopkg.in/yaml.v3"
13+
yaml "go.yaml.in/yaml/v3"
1414

1515
"github.com/go-vela/cli/internal/output"
1616
"github.com/go-vela/sdk-go/vela"
@@ -128,8 +128,6 @@ func (c *Config) AddFromFile(client *vela.Client) error {
128128
}
129129

130130
// create a new decoder from the secret file contents
131-
//
132-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#NewDecoder
133131
input := yaml.NewDecoder(bytes.NewReader(contents))
134132

135133
// create object to store secret file configuration
@@ -138,8 +136,6 @@ func (c *Config) AddFromFile(client *vela.Client) error {
138136
f := new(ConfigFile)
139137

140138
// iterate through all secret file configurations
141-
//
142-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Decoder.Decode
143139
for input.Decode(f) == nil {
144140
// iterate through all secrets from the file configuration
145141
for _, s := range f.Secrets {

action/secret/update.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111

1212
"github.com/sirupsen/logrus"
13-
yaml "gopkg.in/yaml.v3"
13+
yaml "go.yaml.in/yaml/v3"
1414

1515
"github.com/go-vela/cli/internal/output"
1616
"github.com/go-vela/sdk-go/vela"
@@ -126,8 +126,6 @@ func (c *Config) UpdateFromFile(client *vela.Client) error {
126126
}
127127

128128
// create a new decoder from the secret file contents
129-
//
130-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#NewDecoder
131129
input := yaml.NewDecoder(bytes.NewReader(contents))
132130

133131
// create object to store secret file configuration
@@ -136,8 +134,6 @@ func (c *Config) UpdateFromFile(client *vela.Client) error {
136134
f := new(ConfigFile)
137135

138136
// iterate through all secret file configurations
139-
//
140-
// https://pkg.go.dev/gopkg.in/yaml.v3?tab=doc#Decoder.Decode
141137
for input.Decode(f) == nil {
142138
// iterate through all secrets from the file configuration
143139
for _, s := range f.Secrets {

action/secret/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99

1010
"github.com/sirupsen/logrus"
11-
yaml "gopkg.in/yaml.v3"
11+
yaml "go.yaml.in/yaml/v3"
1212

1313
"github.com/go-vela/cli/internal/output"
1414
"github.com/go-vela/sdk-go/vela"

action/settings/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"slices"
1111

1212
"github.com/sirupsen/logrus"
13-
"gopkg.in/yaml.v3"
13+
"go.yaml.in/yaml/v3"
1414

1515
"github.com/go-vela/cli/internal"
1616
"github.com/go-vela/cli/internal/output"

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.24.4
55
require (
66
github.com/Masterminds/semver/v3 v3.4.0
77
github.com/alecthomas/chroma/v2 v2.19.0
8-
github.com/buildkite/yaml v0.0.0-20230306222819-0e4e032d4835
98
github.com/chainguard-dev/git-urls v1.0.2
109
github.com/cli/browser v1.3.0
1110
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
@@ -23,8 +22,8 @@ require (
2322
github.com/spf13/afero v1.14.0
2423
github.com/urfave/cli-docs/v3 v3.0.0-alpha6
2524
github.com/urfave/cli/v3 v3.3.8
25+
go.yaml.in/yaml/v3 v3.0.4
2626
golang.org/x/term v0.32.0
27-
gopkg.in/yaml.v3 v3.0.1
2827
)
2928

3029
require (
@@ -39,6 +38,7 @@ require (
3938
github.com/aymerick/douceur v0.2.0 // indirect
4039
github.com/bahlo/generic-list-go v0.2.0 // indirect
4140
github.com/buger/jsonparser v1.1.1 // indirect
41+
github.com/buildkite/yaml v0.0.0-20230306222819-0e4e032d4835 // indirect
4242
github.com/bytedance/sonic v1.13.3 // indirect
4343
github.com/bytedance/sonic/loader v0.2.4 // indirect
4444
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
@@ -159,7 +159,6 @@ require (
159159
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
160160
go.starlark.net v0.0.0-20250701195324-d457b4515e0e // indirect
161161
go.yaml.in/yaml/v2 v2.4.2 // indirect
162-
go.yaml.in/yaml/v3 v3.0.4 // indirect
163162
golang.org/x/arch v0.18.0 // indirect
164163
golang.org/x/crypto v0.39.0 // indirect
165164
golang.org/x/net v0.41.0 // indirect
@@ -176,6 +175,7 @@ require (
176175
gopkg.in/inf.v0 v0.9.1 // indirect
177176
gopkg.in/warnings.v0 v0.1.2 // indirect
178177
gopkg.in/yaml.v2 v2.4.0 // indirect
178+
gopkg.in/yaml.v3 v3.0.1 // indirect
179179
gorm.io/driver/postgres v1.6.0 // indirect
180180
gorm.io/driver/sqlite v1.6.0 // indirect
181181
gorm.io/gorm v1.30.0 // indirect

0 commit comments

Comments
 (0)