mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-04 00:14:55 +08:00
Introduced 'format' to encapsulate encoding and decoding formats together
This commit is contained in:
@@ -110,14 +110,14 @@ func testScenario(t *testing.T, s *expressionScenario) {
|
||||
|
||||
if s.requiresFormat != "" {
|
||||
format := s.requiresFormat
|
||||
inputFormat, err := InputFormatFromString(format)
|
||||
inputFormat, err := FormatFromString(format)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if decoder := createDecoder(inputFormat); decoder == nil {
|
||||
if decoder := inputFormat.DecoderFactory(); decoder == nil {
|
||||
t.Skipf("no support for %s input format", format)
|
||||
}
|
||||
outputFormat, err := OutputFormatFromString(format)
|
||||
outputFormat, err := FormatFromString(format)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user