mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Switching to YAML org supported go-yaml
This commit is contained in:
@@ -3,7 +3,7 @@ package yqlib
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
yaml "go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
func MapYamlStyle(original yaml.Style) Style {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
yaml "go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
type yamlDecoder struct {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"gopkg.in/yaml.v3"
|
||||
"go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
type yamlEncoder struct {
|
||||
|
||||
@@ -84,6 +84,13 @@ var yamlFormatScenarios = []formatScenario{
|
||||
}
|
||||
|
||||
var yamlParseScenarios = []expressionScenario{
|
||||
// {
|
||||
// description: "with a unquoted question mark in the string",
|
||||
// document: "foo: {bar: a?bc}",
|
||||
// expected: []string{
|
||||
// "D0, P[], (!!map)::a: hello # things\n",
|
||||
// },
|
||||
// },
|
||||
{
|
||||
document: `a: hello # things`,
|
||||
expected: []string{
|
||||
|
||||
Reference in New Issue
Block a user