Introduced 'format' to encapsulate encoding and decoding formats together

This commit is contained in:
Mike Farah
2024-02-24 16:37:13 +11:00
parent 8f6d642012
commit 447bf28cd8
11 changed files with 253 additions and 250 deletions
+3 -3
View File
@@ -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)
}