Skip to content

Commit 99f88df

Browse files
committed
Switching to YAML org supported go-yaml
1 parent 4080883 commit 99f88df

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ require (
1717
github.com/spf13/cobra v1.9.1
1818
github.com/spf13/pflag v1.0.6
1919
github.com/yuin/gopher-lua v1.1.1
20+
go.yaml.in/yaml/v3 v3.0.4
2021
golang.org/x/net v0.41.0
2122
golang.org/x/text v0.26.0
2223
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473
23-
gopkg.in/yaml.v3 v3.0.1
2424
)
2525

2626
require (

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
4949
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
5050
github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
5151
github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
52+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
53+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
5254
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
5355
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
5456
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

pkg/yqlib/candidate_node_yaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package yqlib
33
import (
44
"fmt"
55

6-
yaml "gopkg.in/yaml.v3"
6+
yaml "go.yaml.in/yaml/v3"
77
)
88

99
func MapYamlStyle(original yaml.Style) Style {

pkg/yqlib/decoder_yaml.go

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

11-
yaml "gopkg.in/yaml.v3"
11+
yaml "go.yaml.in/yaml/v3"
1212
)
1313

1414
type yamlDecoder struct {

pkg/yqlib/encoder_yaml.go

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

1111
"github.com/fatih/color"
12-
"gopkg.in/yaml.v3"
12+
"go.yaml.in/yaml/v3"
1313
)
1414

1515
type yamlEncoder struct {

pkg/yqlib/yaml_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ var yamlFormatScenarios = []formatScenario{
8484
}
8585

8686
var yamlParseScenarios = []expressionScenario{
87+
// {
88+
// description: "with a unquoted question mark in the string",
89+
// document: "foo: {bar: a?bc}",
90+
// expected: []string{
91+
// "D0, P[], (!!map)::a: hello # things\n",
92+
// },
93+
// },
8794
{
8895
document: `a: hello # things`,
8996
expected: []string{

release_notes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Added INI support
33
- Fixed 'add' operator when piped in with no data #2378, #2383, #2384
44
- Fixed delete after slice problem (bad node path) #2387 Thanks @antoinedeschenes
5+
- Switched to YAML org supported go-yaml!
56
- Bumped dependencies
67

78

0 commit comments

Comments
 (0)