Skip to content

Commit 61f9cea

Browse files
ndeloofglours
authored andcommitted
use go.yaml.in/yaml/v4
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent dabd353 commit 61f9cea

File tree

17 files changed

+20
-20
lines changed

17 files changed

+20
-20
lines changed

cli/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"strings"
2626

2727
"github.com/sirupsen/logrus"
28-
"go.yaml.in/yaml/v3"
28+
"go.yaml.in/yaml/v4"
2929

3030
"github.com/compose-spec/compose-go/v2/consts"
3131
"github.com/compose-spec/compose-go/v2/dotenv"

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"os"
2525

2626
"github.com/compose-spec/compose-go/v2/cli"
27-
"go.yaml.in/yaml/v3"
27+
"go.yaml.in/yaml/v4"
2828
)
2929

3030
func main() {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/sirupsen/logrus v1.9.0
1515
github.com/stretchr/testify v1.8.4
1616
github.com/xhit/go-str2duration/v2 v2.1.0
17-
go.yaml.in/yaml/v3 v3.0.4
17+
go.yaml.in/yaml/v4 v4.0.0-rc.3
1818
golang.org/x/sync v0.3.0
1919
golang.org/x/text v0.14.0
2020
gotest.tools/v3 v3.4.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
3131
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
3232
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
3333
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
34-
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
35-
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
34+
go.yaml.in/yaml/v4 v4.0.0-rc.3 h1:3h1fjsh1CTAPjW7q/EMe+C8shx5d8ctzZTrLcs/j8Go=
35+
go.yaml.in/yaml/v4 v4.0.0-rc.3/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
3636
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3737
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
3838
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

loader/loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"github.com/compose-spec/compose-go/v2/validation"
4444
"github.com/go-viper/mapstructure/v2"
4545
"github.com/sirupsen/logrus"
46-
"go.yaml.in/yaml/v3"
46+
"go.yaml.in/yaml/v4"
4747
)
4848

4949
// Options supported by Load

loader/merge_reset_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ func Test_DuplicateReset(t *testing.T) {
7979
}, func(options *Options) {
8080
options.SkipNormalization = true
8181
})
82-
assert.Error(t, err, "failed to parse duplicate.yml: line 6: mapping key \"command\" already defined at line 5")
82+
assert.ErrorContains(t, err, "line 6: mapping key \"command\" already defined at line 5")
8383
}

loader/normalize_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"testing"
2121

2222
"github.com/compose-spec/compose-go/v2/types"
23-
"go.yaml.in/yaml/v3"
23+
"go.yaml.in/yaml/v4"
2424
"gotest.tools/v3/assert"
2525
)
2626

loader/reset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323

2424
"github.com/compose-spec/compose-go/v2/tree"
25-
"go.yaml.in/yaml/v3"
25+
"go.yaml.in/yaml/v4"
2626
)
2727

2828
type ResetProcessor struct {

loader/reset_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ x-healthcheck: &healthcheck
163163
<<: *healthcheck
164164
`,
165165
expectError: true,
166-
errorMsg: "failed to parse (inline): cycle detected: node at path x-healthcheck.egress-service.egress-service references node at path x-healthcheck.egress-service",
166+
errorMsg: "cycle detected: node at path x-healthcheck.egress-service.egress-service references node at path x-healthcheck.egress-service",
167167
},
168168
}
169169

@@ -185,7 +185,7 @@ x-healthcheck: &healthcheck
185185
)
186186

187187
if tt.expectError {
188-
assert.Error(t, err, tt.errorMsg)
188+
assert.ErrorContains(t, err, tt.errorMsg)
189189
} else {
190190
assert.NilError(t, err)
191191
}

override/merge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package override
1919
import (
2020
"testing"
2121

22-
"go.yaml.in/yaml/v3"
22+
"go.yaml.in/yaml/v4"
2323
"gotest.tools/v3/assert"
2424
)
2525

0 commit comments

Comments
 (0)